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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 // Get the outer ("stub generator") function. | 482 // Get the outer ("stub generator") function. |
483 const char* name = CodeStub::MajorName(MajorKey()); | 483 const char* name = CodeStub::MajorName(MajorKey()); |
484 Handle<JSFunction> outer = GetFunction(isolate(), name); | 484 Handle<JSFunction> outer = GetFunction(isolate(), name); |
485 DCHECK_EQ(2, outer->shared()->length()); | 485 DCHECK_EQ(2, outer->shared()->length()); |
486 | 486 |
487 // Invoke the outer function to get the stub itself. | 487 // Invoke the outer function to get the stub itself. |
488 Factory* factory = isolate()->factory(); | 488 Factory* factory = isolate()->factory(); |
489 Handle<Object> call_conv = factory->InternalizeUtf8String(name); | 489 Handle<Object> call_conv = factory->InternalizeUtf8String(name); |
490 Handle<Object> minor_key = factory->NewNumber(MinorKey()); | 490 Handle<Object> minor_key = factory->NewNumber(MinorKey()); |
491 Handle<Object> args[] = {call_conv, minor_key}; | 491 Handle<Object> args[] = {call_conv, minor_key}; |
492 MaybeHandle<Object> result = | 492 MaybeHandle<Object> result = Execution::Call( |
493 Execution::Call(isolate(), outer, factory->undefined_value(), 2, args); | 493 isolate(), outer, factory->undefined_value(), 2, args, false); |
494 Handle<JSFunction> inner = Handle<JSFunction>::cast(result.ToHandleChecked()); | 494 Handle<JSFunction> inner = Handle<JSFunction>::cast(result.ToHandleChecked()); |
495 // Just to make sure nobody calls this... | 495 // Just to make sure nobody calls this... |
496 inner->set_code(isolate()->builtins()->builtin(Builtins::kIllegal)); | 496 inner->set_code(isolate()->builtins()->builtin(Builtins::kIllegal)); |
497 | 497 |
498 return Compiler::GetStubCode(inner, this).ToHandleChecked(); | 498 return Compiler::GetStubCode(inner, this).ToHandleChecked(); |
499 } | 499 } |
500 | 500 |
501 | 501 |
502 template<class StateType> | 502 template<class StateType> |
503 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { | 503 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 | 1050 |
1051 if (type->Is(Type::UntaggedPointer())) { | 1051 if (type->Is(Type::UntaggedPointer())) { |
1052 return Representation::External(); | 1052 return Representation::External(); |
1053 } | 1053 } |
1054 | 1054 |
1055 DCHECK(!type->Is(Type::Untagged())); | 1055 DCHECK(!type->Is(Type::Untagged())); |
1056 return Representation::Tagged(); | 1056 return Representation::Tagged(); |
1057 } | 1057 } |
1058 } // namespace internal | 1058 } // namespace internal |
1059 } // namespace v8 | 1059 } // namespace v8 |
OLD | NEW |