| Index: src/builtins/builtins.cc
|
| diff --git a/src/builtins/builtins.cc b/src/builtins/builtins.cc
|
| index c7021029ec5a30a28d04bea03f5baec457a7773a..d642f20882d577e176118cafd1705ba0c71bb20e 100644
|
| --- a/src/builtins/builtins.cc
|
| +++ b/src/builtins/builtins.cc
|
| @@ -203,6 +203,77 @@ const char* Builtins::Lookup(byte* pc) {
|
| return NULL;
|
| }
|
|
|
| +Handle<Code> Builtins::NewFunctionContext(ScopeType scope_type) {
|
| + switch (scope_type) {
|
| + case ScopeType::EVAL_SCOPE:
|
| + return FastNewFunctionContextEval();
|
| + case ScopeType::FUNCTION_SCOPE:
|
| + return FastNewFunctionContextFunction();
|
| + default:
|
| + UNREACHABLE();
|
| + }
|
| + return Handle<Code>::null();
|
| +}
|
| +
|
| +Handle<Code> Builtins::NewCloneShallowArray(
|
| + AllocationSiteMode allocation_mode) {
|
| + switch (allocation_mode) {
|
| + case TRACK_ALLOCATION_SITE:
|
| + return FastCloneShallowArrayTrack();
|
| + case DONT_TRACK_ALLOCATION_SITE:
|
| + return FastCloneShallowArrayDontTrack();
|
| + default:
|
| + UNREACHABLE();
|
| + }
|
| + return Handle<Code>::null();
|
| +}
|
| +
|
| +Handle<Code> Builtins::NewCloneShallowObject(int length) {
|
| + switch (length) {
|
| + case 0:
|
| + return FastCloneShallowObject0();
|
| + case 1:
|
| + return FastCloneShallowObject1();
|
| + case 2:
|
| + return FastCloneShallowObject2();
|
| + case 3:
|
| + return FastCloneShallowObject3();
|
| + case 4:
|
| + return FastCloneShallowObject4();
|
| + case 5:
|
| + return FastCloneShallowObject5();
|
| + case 6:
|
| + return FastCloneShallowObject6();
|
| + default:
|
| + UNREACHABLE();
|
| + }
|
| + return Handle<Code>::null();
|
| +}
|
| +
|
| +Handle<Code> Builtins::NonPrimitiveToPrimitive(ToPrimitiveHint hint) {
|
| + switch (hint) {
|
| + case ToPrimitiveHint::kDefault:
|
| + return NonPrimitiveToPrimitive_Default();
|
| + case ToPrimitiveHint::kNumber:
|
| + return NonPrimitiveToPrimitive_Number();
|
| + case ToPrimitiveHint::kString:
|
| + return NonPrimitiveToPrimitive_String();
|
| + }
|
| + UNREACHABLE();
|
| + return Handle<Code>::null();
|
| +}
|
| +
|
| +Handle<Code> Builtins::OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint) {
|
| + switch (hint) {
|
| + case OrdinaryToPrimitiveHint::kNumber:
|
| + return OrdinaryToPrimitive_Number();
|
| + case OrdinaryToPrimitiveHint::kString:
|
| + return OrdinaryToPrimitive_String();
|
| + }
|
| + UNREACHABLE();
|
| + return Handle<Code>::null();
|
| +}
|
| +
|
| // static
|
| const char* Builtins::name(int index) {
|
| switch (index) {
|
|
|