| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 namespace v8 { | 31 namespace v8 { |
| 32 namespace internal { | 32 namespace internal { |
| 33 | 33 |
| 34 // Specifies extra arguments required by a C++ builtin. | 34 // Specifies extra arguments required by a C++ builtin. |
| 35 enum BuiltinExtraArguments { | 35 enum BuiltinExtraArguments { |
| 36 NO_EXTRA_ARGUMENTS = 0, | 36 NO_EXTRA_ARGUMENTS = 0, |
| 37 NEEDS_CALLED_FUNCTION = 1 | 37 NEEDS_CALLED_FUNCTION = 1 |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 | 40 |
| 41 #define CODE_AGE_LIST_WITH_ARG(V, A) \ |
| 42 V(Quadragenarian, A) \ |
| 43 V(Quinquagenarian, A) \ |
| 44 V(Sexagenarian, A) \ |
| 45 V(Septuagenarian, A) \ |
| 46 V(Octogenarian, A) |
| 47 |
| 48 #define CODE_AGE_LIST_IGNORE_ARG(X, V) V(X) |
| 49 |
| 50 #define CODE_AGE_LIST(V) \ |
| 51 CODE_AGE_LIST_WITH_ARG(CODE_AGE_LIST_IGNORE_ARG, V) |
| 52 |
| 53 #define DECLARE_CODE_AGE_BUILTIN(C, V) \ |
| 54 V(Make##C##CodeYoungAgainOddMarking, BUILTIN, \ |
| 55 UNINITIALIZED, Code::kNoExtraICState) \ |
| 56 V(Make##C##CodeYoungAgainEvenMarking, BUILTIN, \ |
| 57 UNINITIALIZED, Code::kNoExtraICState) |
| 58 |
| 59 |
| 41 // Define list of builtins implemented in C++. | 60 // Define list of builtins implemented in C++. |
| 42 #define BUILTIN_LIST_C(V) \ | 61 #define BUILTIN_LIST_C(V) \ |
| 43 V(Illegal, NO_EXTRA_ARGUMENTS) \ | 62 V(Illegal, NO_EXTRA_ARGUMENTS) \ |
| 44 \ | 63 \ |
| 45 V(EmptyFunction, NO_EXTRA_ARGUMENTS) \ | 64 V(EmptyFunction, NO_EXTRA_ARGUMENTS) \ |
| 46 \ | 65 \ |
| 47 V(InternalArrayCodeGeneric, NO_EXTRA_ARGUMENTS) \ | 66 V(InternalArrayCodeGeneric, NO_EXTRA_ARGUMENTS) \ |
| 48 V(ArrayCodeGeneric, NO_EXTRA_ARGUMENTS) \ | 67 V(ArrayCodeGeneric, NO_EXTRA_ARGUMENTS) \ |
| 49 \ | 68 \ |
| 50 V(ArrayPush, NO_EXTRA_ARGUMENTS) \ | 69 V(ArrayPush, NO_EXTRA_ARGUMENTS) \ |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 Code::kNoExtraICState) \ | 207 Code::kNoExtraICState) \ |
| 189 V(ArrayCode, BUILTIN, UNINITIALIZED, \ | 208 V(ArrayCode, BUILTIN, UNINITIALIZED, \ |
| 190 Code::kNoExtraICState) \ | 209 Code::kNoExtraICState) \ |
| 191 V(ArrayConstructCode, BUILTIN, UNINITIALIZED, \ | 210 V(ArrayConstructCode, BUILTIN, UNINITIALIZED, \ |
| 192 Code::kNoExtraICState) \ | 211 Code::kNoExtraICState) \ |
| 193 \ | 212 \ |
| 194 V(StringConstructCode, BUILTIN, UNINITIALIZED, \ | 213 V(StringConstructCode, BUILTIN, UNINITIALIZED, \ |
| 195 Code::kNoExtraICState) \ | 214 Code::kNoExtraICState) \ |
| 196 \ | 215 \ |
| 197 V(OnStackReplacement, BUILTIN, UNINITIALIZED, \ | 216 V(OnStackReplacement, BUILTIN, UNINITIALIZED, \ |
| 198 Code::kNoExtraICState) | 217 Code::kNoExtraICState) \ |
| 199 | 218 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) |
| 200 | 219 |
| 201 #ifdef ENABLE_DEBUGGER_SUPPORT | 220 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 202 // Define list of builtins used by the debugger implemented in assembly. | 221 // Define list of builtins used by the debugger implemented in assembly. |
| 203 #define BUILTIN_LIST_DEBUG_A(V) \ | 222 #define BUILTIN_LIST_DEBUG_A(V) \ |
| 204 V(Return_DebugBreak, BUILTIN, DEBUG_BREAK, \ | 223 V(Return_DebugBreak, BUILTIN, DEBUG_BREAK, \ |
| 205 Code::kNoExtraICState) \ | 224 Code::kNoExtraICState) \ |
| 206 V(CallFunctionStub_DebugBreak, BUILTIN, DEBUG_BREAK, \ | 225 V(CallFunctionStub_DebugBreak, BUILTIN, DEBUG_BREAK, \ |
| 207 Code::kNoExtraICState) \ | 226 Code::kNoExtraICState) \ |
| 208 V(CallFunctionStub_Recording_DebugBreak, BUILTIN, DEBUG_BREAK, \ | 227 V(CallFunctionStub_Recording_DebugBreak, BUILTIN, DEBUG_BREAK, \ |
| 209 Code::kNoExtraICState) \ | 228 Code::kNoExtraICState) \ |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 static void Generate_FunctionCall(MacroAssembler* masm); | 391 static void Generate_FunctionCall(MacroAssembler* masm); |
| 373 static void Generate_FunctionApply(MacroAssembler* masm); | 392 static void Generate_FunctionApply(MacroAssembler* masm); |
| 374 | 393 |
| 375 static void Generate_InternalArrayCode(MacroAssembler* masm); | 394 static void Generate_InternalArrayCode(MacroAssembler* masm); |
| 376 static void Generate_ArrayCode(MacroAssembler* masm); | 395 static void Generate_ArrayCode(MacroAssembler* masm); |
| 377 static void Generate_ArrayConstructCode(MacroAssembler* masm); | 396 static void Generate_ArrayConstructCode(MacroAssembler* masm); |
| 378 | 397 |
| 379 static void Generate_StringConstructCode(MacroAssembler* masm); | 398 static void Generate_StringConstructCode(MacroAssembler* masm); |
| 380 static void Generate_OnStackReplacement(MacroAssembler* masm); | 399 static void Generate_OnStackReplacement(MacroAssembler* masm); |
| 381 | 400 |
| 401 #define DECLARE_CODE_AGE_BUILTIN_GENERATOR(C) \ |
| 402 static void Generate_Make##C##CodeYoungAgainEvenMarking( \ |
| 403 MacroAssembler* masm); \ |
| 404 static void Generate_Make##C##CodeYoungAgainOddMarking( \ |
| 405 MacroAssembler* masm); |
| 406 CODE_AGE_LIST(DECLARE_CODE_AGE_BUILTIN_GENERATOR) |
| 407 #undef DECLARE_CODE_AGE_BUILTIN_GENERATOR |
| 408 |
| 382 static void InitBuiltinFunctionTable(); | 409 static void InitBuiltinFunctionTable(); |
| 383 | 410 |
| 384 bool initialized_; | 411 bool initialized_; |
| 385 | 412 |
| 386 friend class BuiltinFunctionTable; | 413 friend class BuiltinFunctionTable; |
| 387 friend class Isolate; | 414 friend class Isolate; |
| 388 | 415 |
| 389 DISALLOW_COPY_AND_ASSIGN(Builtins); | 416 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 390 }; | 417 }; |
| 391 | 418 |
| 392 } } // namespace v8::internal | 419 } } // namespace v8::internal |
| 393 | 420 |
| 394 #endif // V8_BUILTINS_H_ | 421 #endif // V8_BUILTINS_H_ |
| OLD | NEW |