/*
 * Copyright (C) 2010 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package libcore.io;

/*-[
#import "java/lang/AssertionError.h"
]-*/

public final class SizeOf {
    public static final int CHAR = sizeOf('C');
    public static final int DOUBLE = sizeOf('D');
    public static final int FLOAT = sizeOf('F');
    public static final int INT = sizeOf('I');
    public static final int LONG = sizeOf('J');
    public static final int SHORT = sizeOf('S');

    private static native int sizeOf(char type) /*-[
      switch (type) {
        case 'C': return sizeof(unichar);
        case 'D': return sizeof(double);
        case 'F': return sizeof(float);
        case 'I': return sizeof(int);
        case 'J': return sizeof(long long);
        case 'S': return sizeof(short);
        default:
          @throw AUTORELEASE([[JavaLangAssertionError alloc] init]);
          return -1;  // never returned
      }
    ]-*/;

    private SizeOf() {
    }
}

@@ -639,56 +639,8 @@
 o;%0A%0A
-/*-%5B%0A#import %22java/lang/AssertionError.h%22%0A%5D-*/%0A%0A
 publ
@@ -702,19 +702,9 @@
 R = 
-sizeOf('C')
+2
 ;%0A  
@@ -742,19 +742,9 @@
 E = 
-sizeOf('D')
+8
 ;%0A  
@@ -781,19 +781,9 @@
 T = 
-sizeOf('F')
+4
 ;%0A  
@@ -818,19 +818,9 @@
 T = 
-sizeOf('I')
+4
 ;%0A  
@@ -856,19 +856,9 @@
 G = 
-sizeOf('J')
+8
 ;%0A  
@@ -895,484 +895,9 @@
 T = 
-sizeOf('S');%0A%0A    private static native int sizeOf(char type) /*-%5B%0A      switch (type) %7B%0A        case 'C': return sizeof(unichar);%0A        case 'D': return sizeof(double);%0A        case 'F': return sizeof(float);%0A        case 'I': return sizeof(int);%0A        case 'J': return sizeof(long long);%0A        case 'S': return sizeof(short);%0A        default:%0A          @throw AUTORELEASE(%5B%5BJavaLangAssertionError alloc%5D init%5D);%0A          return -1;  // never returned%0A      %7D%0A    %5D-*/
+2
 ;%0A%0A 

Revert to hard-coded values in SizeOf.java. Change on 2015/02/04 by kstanger <kstanger@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=85550316