| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 "bootstrapper.h" | 5 #include "bootstrapper.h" |
| 6 | 6 |
| 7 #include "accessors.h" | 7 #include "accessors.h" |
| 8 #include "isolate-inl.h" | 8 #include "isolate-inl.h" |
| 9 #include "natives.h" | 9 #include "natives.h" |
| 10 #include "snapshot.h" | 10 #include "snapshot.h" |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 STATIC_ASCII_VECTOR("ThrowTypeError")); | 569 STATIC_ASCII_VECTOR("ThrowTypeError")); |
| 570 throw_type_error_function = | 570 throw_type_error_function = |
| 571 factory()->NewFunctionWithoutPrototype(name, SLOPPY); | 571 factory()->NewFunctionWithoutPrototype(name, SLOPPY); |
| 572 Handle<Code> code(isolate()->builtins()->builtin( | 572 Handle<Code> code(isolate()->builtins()->builtin( |
| 573 Builtins::kStrictModePoisonPill)); | 573 Builtins::kStrictModePoisonPill)); |
| 574 throw_type_error_function->set_map(native_context()->sloppy_function_map()); | 574 throw_type_error_function->set_map(native_context()->sloppy_function_map()); |
| 575 throw_type_error_function->set_code(*code); | 575 throw_type_error_function->set_code(*code); |
| 576 throw_type_error_function->shared()->set_code(*code); | 576 throw_type_error_function->shared()->set_code(*code); |
| 577 throw_type_error_function->shared()->DontAdaptArguments(); | 577 throw_type_error_function->shared()->DontAdaptArguments(); |
| 578 | 578 |
| 579 JSObject::PreventExtensions(throw_type_error_function); | 579 JSObject::PreventExtensions(throw_type_error_function).Assert(); |
| 580 } | 580 } |
| 581 return throw_type_error_function; | 581 return throw_type_error_function; |
| 582 } | 582 } |
| 583 | 583 |
| 584 | 584 |
| 585 Handle<Map> Genesis::CreateStrictFunctionMap( | 585 Handle<Map> Genesis::CreateStrictFunctionMap( |
| 586 PrototypePropertyMode prototype_mode, | 586 PrototypePropertyMode prototype_mode, |
| 587 Handle<JSFunction> empty_function) { | 587 Handle<JSFunction> empty_function) { |
| 588 Handle<Map> map = factory()->NewMap(JS_FUNCTION_TYPE, JSFunction::kSize); | 588 Handle<Map> map = factory()->NewMap(JS_FUNCTION_TYPE, JSFunction::kSize); |
| 589 SetStrictFunctionInstanceDescriptor(map, prototype_mode); | 589 SetStrictFunctionInstanceDescriptor(map, prototype_mode); |
| (...skipping 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2665 return from + sizeof(NestingCounterType); | 2665 return from + sizeof(NestingCounterType); |
| 2666 } | 2666 } |
| 2667 | 2667 |
| 2668 | 2668 |
| 2669 // Called when the top-level V8 mutex is destroyed. | 2669 // Called when the top-level V8 mutex is destroyed. |
| 2670 void Bootstrapper::FreeThreadResources() { | 2670 void Bootstrapper::FreeThreadResources() { |
| 2671 ASSERT(!IsActive()); | 2671 ASSERT(!IsActive()); |
| 2672 } | 2672 } |
| 2673 | 2673 |
| 2674 } } // namespace v8::internal | 2674 } } // namespace v8::internal |
| OLD | NEW |