| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 MarkPrototypeFailure(name); | 332 MarkPrototypeFailure(name); |
| 333 return; | 333 return; |
| 334 } | 334 } |
| 335 | 335 |
| 336 // The builtins object is special. It only changes when JavaScript | 336 // The builtins object is special. It only changes when JavaScript |
| 337 // builtins are loaded lazily. It is important to keep inline | 337 // builtins are loaded lazily. It is important to keep inline |
| 338 // caches for the builtins object monomorphic. Therefore, if we get | 338 // caches for the builtins object monomorphic. Therefore, if we get |
| 339 // an inline cache miss for the builtins object after lazily loading | 339 // an inline cache miss for the builtins object after lazily loading |
| 340 // JavaScript builtins, we return uninitialized as the state to | 340 // JavaScript builtins, we return uninitialized as the state to |
| 341 // force the inline cache back to monomorphic state. | 341 // force the inline cache back to monomorphic state. |
| 342 if (receiver->IsJSBuiltinsObject()) state_ = UNINITIALIZED; | 342 if (receiver->IsJSBuiltinsObject()) state_ = PREMONOMORPHIC; |
| 343 } | 343 } |
| 344 | 344 |
| 345 | 345 |
| 346 MaybeHandle<Object> IC::TypeError(const char* type, Handle<Object> object, | 346 MaybeHandle<Object> IC::TypeError(const char* type, Handle<Object> object, |
| 347 Handle<Object> key) { | 347 Handle<Object> key) { |
| 348 HandleScope scope(isolate()); | 348 HandleScope scope(isolate()); |
| 349 Handle<Object> args[2] = {key, object}; | 349 Handle<Object> args[2] = {key, object}; |
| 350 THROW_NEW_ERROR(isolate(), NewTypeError(type, HandleVector(args, 2)), Object); | 350 THROW_NEW_ERROR(isolate(), NewTypeError(type, HandleVector(args, 2)), Object); |
| 351 } | 351 } |
| 352 | 352 |
| (...skipping 2428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2781 static const Address IC_utilities[] = { | 2781 static const Address IC_utilities[] = { |
| 2782 #define ADDR(name) FUNCTION_ADDR(name), | 2782 #define ADDR(name) FUNCTION_ADDR(name), |
| 2783 IC_UTIL_LIST(ADDR) NULL | 2783 IC_UTIL_LIST(ADDR) NULL |
| 2784 #undef ADDR | 2784 #undef ADDR |
| 2785 }; | 2785 }; |
| 2786 | 2786 |
| 2787 | 2787 |
| 2788 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 2788 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
| 2789 } | 2789 } |
| 2790 } // namespace v8::internal | 2790 } // namespace v8::internal |
| OLD | NEW |