| 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/code-stubs.h" | 5 #include "src/code-stubs.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 } | 460 } |
| 461 TraceTransition(old_state, state); | 461 TraceTransition(old_state, state); |
| 462 set_sub_minor_key(TypesBits::update(sub_minor_key(), state.ToIntegral())); | 462 set_sub_minor_key(TypesBits::update(sub_minor_key(), state.ToIntegral())); |
| 463 } | 463 } |
| 464 | 464 |
| 465 | 465 |
| 466 namespace { | 466 namespace { |
| 467 | 467 |
| 468 Handle<JSFunction> GetFunction(Isolate* isolate, const char* name) { | 468 Handle<JSFunction> GetFunction(Isolate* isolate, const char* name) { |
| 469 v8::ExtensionConfiguration no_extensions; | 469 v8::ExtensionConfiguration no_extensions; |
| 470 Handle<Context> ctx = isolate->bootstrapper()->CreateEnvironment( | 470 MaybeHandle<Object> fun = Object::GetProperty( |
| 471 MaybeHandle<JSGlobalProxy>(), v8::Local<v8::ObjectTemplate>(), | 471 isolate, isolate->factory()->code_stub_exports_object(), name); |
| 472 &no_extensions); | |
| 473 Handle<JSBuiltinsObject> builtins = handle(ctx->builtins()); | |
| 474 MaybeHandle<Object> fun = Object::GetProperty(isolate, builtins, name); | |
| 475 Handle<JSFunction> function = Handle<JSFunction>::cast(fun.ToHandleChecked()); | 472 Handle<JSFunction> function = Handle<JSFunction>::cast(fun.ToHandleChecked()); |
| 476 DCHECK(!function->IsUndefined() && | 473 DCHECK(!function->IsUndefined() && |
| 477 "JavaScript implementation of stub not found"); | 474 "JavaScript implementation of stub not found"); |
| 478 return function; | 475 return function; |
| 479 } | 476 } |
| 480 } // namespace | 477 } // namespace |
| 481 | 478 |
| 482 | 479 |
| 483 Handle<Code> TurboFanCodeStub::GenerateCode() { | 480 Handle<Code> TurboFanCodeStub::GenerateCode() { |
| 484 // Get the outer ("stub generator") function. | 481 // Get the outer ("stub generator") function. |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 | 1058 |
| 1062 if (type->Is(Type::UntaggedPointer())) { | 1059 if (type->Is(Type::UntaggedPointer())) { |
| 1063 return Representation::External(); | 1060 return Representation::External(); |
| 1064 } | 1061 } |
| 1065 | 1062 |
| 1066 DCHECK(!type->Is(Type::Untagged())); | 1063 DCHECK(!type->Is(Type::Untagged())); |
| 1067 return Representation::Tagged(); | 1064 return Representation::Tagged(); |
| 1068 } | 1065 } |
| 1069 } // namespace internal | 1066 } // namespace internal |
| 1070 } // namespace v8 | 1067 } // namespace v8 |
| OLD | NEW |