| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 static MaybeObject* Builtin_##name(name##ArgumentsType args, Isolate* isolate) | 143 static MaybeObject* Builtin_##name(name##ArgumentsType args, Isolate* isolate) |
| 144 | 144 |
| 145 #endif | 145 #endif |
| 146 | 146 |
| 147 | 147 |
| 148 static inline bool CalledAsConstructor(Isolate* isolate) { | 148 static inline bool CalledAsConstructor(Isolate* isolate) { |
| 149 #ifdef DEBUG | 149 #ifdef DEBUG |
| 150 // Calculate the result using a full stack frame iterator and check | 150 // Calculate the result using a full stack frame iterator and check |
| 151 // that the state of the stack is as we assume it to be in the | 151 // that the state of the stack is as we assume it to be in the |
| 152 // code below. | 152 // code below. |
| 153 StackFrameIterator it; | 153 StackFrameIterator it(isolate); |
| 154 ASSERT(it.frame()->is_exit()); | 154 ASSERT(it.frame()->is_exit()); |
| 155 it.Advance(); | 155 it.Advance(); |
| 156 StackFrame* frame = it.frame(); | 156 StackFrame* frame = it.frame(); |
| 157 bool reference_result = frame->is_construct(); | 157 bool reference_result = frame->is_construct(); |
| 158 #endif | 158 #endif |
| 159 Address fp = Isolate::c_entry_fp(isolate->thread_local_top()); | 159 Address fp = Isolate::c_entry_fp(isolate->thread_local_top()); |
| 160 // Because we know fp points to an exit frame we can use the relevant | 160 // Because we know fp points to an exit frame we can use the relevant |
| 161 // part of ExitFrame::ComputeCallerState directly. | 161 // part of ExitFrame::ComputeCallerState directly. |
| 162 const int kCallerOffset = ExitFrameConstants::kCallerFPOffset; | 162 const int kCallerOffset = ExitFrameConstants::kCallerFPOffset; |
| 163 Address caller_fp = Memory::Address_at(fp + kCallerOffset); | 163 Address caller_fp = Memory::Address_at(fp + kCallerOffset); |
| (...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 | 1199 |
| 1200 return result_array; | 1200 return result_array; |
| 1201 } | 1201 } |
| 1202 | 1202 |
| 1203 | 1203 |
| 1204 // ----------------------------------------------------------------------------- | 1204 // ----------------------------------------------------------------------------- |
| 1205 // Strict mode poison pills | 1205 // Strict mode poison pills |
| 1206 | 1206 |
| 1207 | 1207 |
| 1208 BUILTIN(StrictModePoisonPill) { | 1208 BUILTIN(StrictModePoisonPill) { |
| 1209 HandleScope scope; | 1209 HandleScope scope(isolate); |
| 1210 return isolate->Throw(*isolate->factory()->NewTypeError( | 1210 return isolate->Throw(*isolate->factory()->NewTypeError( |
| 1211 "strict_poison_pill", HandleVector<Object>(NULL, 0))); | 1211 "strict_poison_pill", HandleVector<Object>(NULL, 0))); |
| 1212 } | 1212 } |
| 1213 | 1213 |
| 1214 // ----------------------------------------------------------------------------- | 1214 // ----------------------------------------------------------------------------- |
| 1215 // | 1215 // |
| 1216 | 1216 |
| 1217 | 1217 |
| 1218 // Searches the hidden prototype chain of the given object for the first | 1218 // Searches the hidden prototype chain of the given object for the first |
| 1219 // object that is an instance of the given type. If no such object can | 1219 // object that is an instance of the given type. If no such object can |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1875 return Handle<Code>(code_address); \ | 1875 return Handle<Code>(code_address); \ |
| 1876 } | 1876 } |
| 1877 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1877 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 1878 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1878 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1879 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1879 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1880 #undef DEFINE_BUILTIN_ACCESSOR_C | 1880 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 1881 #undef DEFINE_BUILTIN_ACCESSOR_A | 1881 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 1882 | 1882 |
| 1883 | 1883 |
| 1884 } } // namespace v8::internal | 1884 } } // namespace v8::internal |
| OLD | NEW |