| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // Define list of builtins implemented in assembly. | 64 // Define list of builtins implemented in assembly. |
| 65 #define BUILTIN_LIST_A(V) \ | 65 #define BUILTIN_LIST_A(V) \ |
| 66 V(ArgumentsAdaptorTrampoline, BUILTIN, UNINITIALIZED) \ | 66 V(ArgumentsAdaptorTrampoline, BUILTIN, UNINITIALIZED) \ |
| 67 V(JSConstructCall, BUILTIN, UNINITIALIZED) \ | 67 V(JSConstructCall, BUILTIN, UNINITIALIZED) \ |
| 68 V(JSConstructStubCountdown, BUILTIN, UNINITIALIZED) \ | 68 V(JSConstructStubCountdown, BUILTIN, UNINITIALIZED) \ |
| 69 V(JSConstructStubGeneric, BUILTIN, UNINITIALIZED) \ | 69 V(JSConstructStubGeneric, BUILTIN, UNINITIALIZED) \ |
| 70 V(JSConstructStubApi, BUILTIN, UNINITIALIZED) \ | 70 V(JSConstructStubApi, BUILTIN, UNINITIALIZED) \ |
| 71 V(JSEntryTrampoline, BUILTIN, UNINITIALIZED) \ | 71 V(JSEntryTrampoline, BUILTIN, UNINITIALIZED) \ |
| 72 V(JSConstructEntryTrampoline, BUILTIN, UNINITIALIZED) \ | 72 V(JSConstructEntryTrampoline, BUILTIN, UNINITIALIZED) \ |
| 73 V(LazyCompile, BUILTIN, UNINITIALIZED) \ | 73 V(LazyCompile, BUILTIN, UNINITIALIZED) \ |
| 74 V(LazyRecompile, BUILTIN, UNINITIALIZED) \ |
| 75 V(NotifyDeoptimized, BUILTIN, UNINITIALIZED) \ |
| 76 V(NotifyLazyDeoptimized, BUILTIN, UNINITIALIZED) \ |
| 77 V(NotifyOSR, BUILTIN, UNINITIALIZED) \ |
| 74 \ | 78 \ |
| 75 V(LoadIC_Miss, BUILTIN, UNINITIALIZED) \ | 79 V(LoadIC_Miss, BUILTIN, UNINITIALIZED) \ |
| 76 V(KeyedLoadIC_Miss, BUILTIN, UNINITIALIZED) \ | 80 V(KeyedLoadIC_Miss, BUILTIN, UNINITIALIZED) \ |
| 77 V(StoreIC_Miss, BUILTIN, UNINITIALIZED) \ | 81 V(StoreIC_Miss, BUILTIN, UNINITIALIZED) \ |
| 78 V(KeyedStoreIC_Miss, BUILTIN, UNINITIALIZED) \ | 82 V(KeyedStoreIC_Miss, BUILTIN, UNINITIALIZED) \ |
| 79 \ | 83 \ |
| 80 V(LoadIC_Initialize, LOAD_IC, UNINITIALIZED) \ | 84 V(LoadIC_Initialize, LOAD_IC, UNINITIALIZED) \ |
| 81 V(LoadIC_PreMonomorphic, LOAD_IC, PREMONOMORPHIC) \ | 85 V(LoadIC_PreMonomorphic, LOAD_IC, PREMONOMORPHIC) \ |
| 82 V(LoadIC_Normal, LOAD_IC, MONOMORPHIC) \ | 86 V(LoadIC_Normal, LOAD_IC, MONOMORPHIC) \ |
| 83 V(LoadIC_ArrayLength, LOAD_IC, MONOMORPHIC) \ | 87 V(LoadIC_ArrayLength, LOAD_IC, MONOMORPHIC) \ |
| (...skipping 11 matching lines...) Expand all Loading... |
| 95 V(KeyedLoadIC_ExternalUnsignedShortArray, KEYED_LOAD_IC, MEGAMORPHIC) \ | 99 V(KeyedLoadIC_ExternalUnsignedShortArray, KEYED_LOAD_IC, MEGAMORPHIC) \ |
| 96 V(KeyedLoadIC_ExternalIntArray, KEYED_LOAD_IC, MEGAMORPHIC) \ | 100 V(KeyedLoadIC_ExternalIntArray, KEYED_LOAD_IC, MEGAMORPHIC) \ |
| 97 V(KeyedLoadIC_ExternalUnsignedIntArray, KEYED_LOAD_IC, MEGAMORPHIC) \ | 101 V(KeyedLoadIC_ExternalUnsignedIntArray, KEYED_LOAD_IC, MEGAMORPHIC) \ |
| 98 V(KeyedLoadIC_ExternalFloatArray, KEYED_LOAD_IC, MEGAMORPHIC) \ | 102 V(KeyedLoadIC_ExternalFloatArray, KEYED_LOAD_IC, MEGAMORPHIC) \ |
| 99 V(KeyedLoadIC_IndexedInterceptor, KEYED_LOAD_IC, MEGAMORPHIC) \ | 103 V(KeyedLoadIC_IndexedInterceptor, KEYED_LOAD_IC, MEGAMORPHIC) \ |
| 100 \ | 104 \ |
| 101 V(StoreIC_Initialize, STORE_IC, UNINITIALIZED) \ | 105 V(StoreIC_Initialize, STORE_IC, UNINITIALIZED) \ |
| 102 V(StoreIC_ArrayLength, STORE_IC, MONOMORPHIC) \ | 106 V(StoreIC_ArrayLength, STORE_IC, MONOMORPHIC) \ |
| 103 V(StoreIC_Normal, STORE_IC, MONOMORPHIC) \ | 107 V(StoreIC_Normal, STORE_IC, MONOMORPHIC) \ |
| 104 V(StoreIC_Megamorphic, STORE_IC, MEGAMORPHIC) \ | 108 V(StoreIC_Megamorphic, STORE_IC, MEGAMORPHIC) \ |
| 109 V(StoreIC_GlobalProxy, STORE_IC, MEGAMORPHIC) \ |
| 105 \ | 110 \ |
| 106 V(KeyedStoreIC_Initialize, KEYED_STORE_IC, UNINITIALIZED) \ | 111 V(KeyedStoreIC_Initialize, KEYED_STORE_IC, UNINITIALIZED) \ |
| 107 V(KeyedStoreIC_Generic, KEYED_STORE_IC, MEGAMORPHIC) \ | 112 V(KeyedStoreIC_Generic, KEYED_STORE_IC, MEGAMORPHIC) \ |
| 108 V(KeyedStoreIC_ExternalByteArray, KEYED_STORE_IC, MEGAMORPHIC) \ | 113 V(KeyedStoreIC_ExternalByteArray, KEYED_STORE_IC, MEGAMORPHIC) \ |
| 109 V(KeyedStoreIC_ExternalUnsignedByteArray, KEYED_STORE_IC, MEGAMORPHIC) \ | 114 V(KeyedStoreIC_ExternalUnsignedByteArray, KEYED_STORE_IC, MEGAMORPHIC) \ |
| 110 V(KeyedStoreIC_ExternalShortArray, KEYED_STORE_IC, MEGAMORPHIC) \ | 115 V(KeyedStoreIC_ExternalShortArray, KEYED_STORE_IC, MEGAMORPHIC) \ |
| 111 V(KeyedStoreIC_ExternalUnsignedShortArray, KEYED_STORE_IC, MEGAMORPHIC) \ | 116 V(KeyedStoreIC_ExternalUnsignedShortArray, KEYED_STORE_IC, MEGAMORPHIC) \ |
| 112 V(KeyedStoreIC_ExternalIntArray, KEYED_STORE_IC, MEGAMORPHIC) \ | 117 V(KeyedStoreIC_ExternalIntArray, KEYED_STORE_IC, MEGAMORPHIC) \ |
| 113 V(KeyedStoreIC_ExternalUnsignedIntArray, KEYED_STORE_IC, MEGAMORPHIC) \ | 118 V(KeyedStoreIC_ExternalUnsignedIntArray, KEYED_STORE_IC, MEGAMORPHIC) \ |
| 114 V(KeyedStoreIC_ExternalFloatArray, KEYED_STORE_IC, MEGAMORPHIC) \ | 119 V(KeyedStoreIC_ExternalFloatArray, KEYED_STORE_IC, MEGAMORPHIC) \ |
| 115 \ | 120 \ |
| 116 /* Uses KeyedLoadIC_Initialize; must be after in list. */ \ | 121 /* Uses KeyedLoadIC_Initialize; must be after in list. */ \ |
| 117 V(FunctionCall, BUILTIN, UNINITIALIZED) \ | 122 V(FunctionCall, BUILTIN, UNINITIALIZED) \ |
| 118 V(FunctionApply, BUILTIN, UNINITIALIZED) \ | 123 V(FunctionApply, BUILTIN, UNINITIALIZED) \ |
| 119 \ | 124 \ |
| 120 V(ArrayCode, BUILTIN, UNINITIALIZED) \ | 125 V(ArrayCode, BUILTIN, UNINITIALIZED) \ |
| 121 V(ArrayConstructCode, BUILTIN, UNINITIALIZED) \ | 126 V(ArrayConstructCode, BUILTIN, UNINITIALIZED) \ |
| 122 \ | 127 \ |
| 123 V(StringConstructCode, BUILTIN, UNINITIALIZED) | 128 V(StringConstructCode, BUILTIN, UNINITIALIZED) \ |
| 129 \ |
| 130 V(OnStackReplacement, BUILTIN, UNINITIALIZED) |
| 124 | 131 |
| 125 | 132 |
| 126 #ifdef ENABLE_DEBUGGER_SUPPORT | 133 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 127 // Define list of builtins used by the debugger implemented in assembly. | 134 // Define list of builtins used by the debugger implemented in assembly. |
| 128 #define BUILTIN_LIST_DEBUG_A(V) \ | 135 #define BUILTIN_LIST_DEBUG_A(V) \ |
| 129 V(Return_DebugBreak, BUILTIN, DEBUG_BREAK) \ | 136 V(Return_DebugBreak, BUILTIN, DEBUG_BREAK) \ |
| 130 V(ConstructCall_DebugBreak, BUILTIN, DEBUG_BREAK) \ | 137 V(ConstructCall_DebugBreak, BUILTIN, DEBUG_BREAK) \ |
| 131 V(StubNoRegisters_DebugBreak, BUILTIN, DEBUG_BREAK) \ | 138 V(StubNoRegisters_DebugBreak, BUILTIN, DEBUG_BREAK) \ |
| 132 V(LoadIC_DebugBreak, LOAD_IC, DEBUG_BREAK) \ | 139 V(LoadIC_DebugBreak, LOAD_IC, DEBUG_BREAK) \ |
| 133 V(KeyedLoadIC_DebugBreak, KEYED_LOAD_IC, DEBUG_BREAK) \ | 140 V(KeyedLoadIC_DebugBreak, KEYED_LOAD_IC, DEBUG_BREAK) \ |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 static void Generate_Adaptor(MacroAssembler* masm, | 263 static void Generate_Adaptor(MacroAssembler* masm, |
| 257 CFunctionId id, | 264 CFunctionId id, |
| 258 BuiltinExtraArguments extra_args); | 265 BuiltinExtraArguments extra_args); |
| 259 static void Generate_JSConstructCall(MacroAssembler* masm); | 266 static void Generate_JSConstructCall(MacroAssembler* masm); |
| 260 static void Generate_JSConstructStubCountdown(MacroAssembler* masm); | 267 static void Generate_JSConstructStubCountdown(MacroAssembler* masm); |
| 261 static void Generate_JSConstructStubGeneric(MacroAssembler* masm); | 268 static void Generate_JSConstructStubGeneric(MacroAssembler* masm); |
| 262 static void Generate_JSConstructStubApi(MacroAssembler* masm); | 269 static void Generate_JSConstructStubApi(MacroAssembler* masm); |
| 263 static void Generate_JSEntryTrampoline(MacroAssembler* masm); | 270 static void Generate_JSEntryTrampoline(MacroAssembler* masm); |
| 264 static void Generate_JSConstructEntryTrampoline(MacroAssembler* masm); | 271 static void Generate_JSConstructEntryTrampoline(MacroAssembler* masm); |
| 265 static void Generate_LazyCompile(MacroAssembler* masm); | 272 static void Generate_LazyCompile(MacroAssembler* masm); |
| 273 static void Generate_LazyRecompile(MacroAssembler* masm); |
| 274 static void Generate_NotifyDeoptimized(MacroAssembler* masm); |
| 275 static void Generate_NotifyLazyDeoptimized(MacroAssembler* masm); |
| 276 static void Generate_NotifyOSR(MacroAssembler* masm); |
| 266 static void Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm); | 277 static void Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm); |
| 267 | 278 |
| 268 static void Generate_FunctionCall(MacroAssembler* masm); | 279 static void Generate_FunctionCall(MacroAssembler* masm); |
| 269 static void Generate_FunctionApply(MacroAssembler* masm); | 280 static void Generate_FunctionApply(MacroAssembler* masm); |
| 270 | 281 |
| 271 static void Generate_ArrayCode(MacroAssembler* masm); | 282 static void Generate_ArrayCode(MacroAssembler* masm); |
| 272 static void Generate_ArrayConstructCode(MacroAssembler* masm); | 283 static void Generate_ArrayConstructCode(MacroAssembler* masm); |
| 273 | 284 |
| 274 static void Generate_StringConstructCode(MacroAssembler* masm); | 285 static void Generate_StringConstructCode(MacroAssembler* masm); |
| 286 static void Generate_OnStackReplacement(MacroAssembler* masm); |
| 275 | 287 |
| 276 static void InitBuiltinFunctionTable(); | 288 static void InitBuiltinFunctionTable(); |
| 277 | 289 |
| 278 bool initialized_; | 290 bool initialized_; |
| 279 | 291 |
| 280 friend class BuiltinFunctionTable; | 292 friend class BuiltinFunctionTable; |
| 281 friend class Isolate; | 293 friend class Isolate; |
| 282 | 294 |
| 283 DISALLOW_COPY_AND_ASSIGN(Builtins); | 295 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 284 }; | 296 }; |
| 285 | 297 |
| 286 } } // namespace v8::internal | 298 } } // namespace v8::internal |
| 287 | 299 |
| 288 #endif // V8_BUILTINS_H_ | 300 #endif // V8_BUILTINS_H_ |
| OLD | NEW |