| 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 "src/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" | 
| 6 | 6 | 
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" | 
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" | 
| 9 #include "src/conversions-inl.h" | 9 #include "src/conversions-inl.h" | 
| 10 #include "src/elements.h" | 10 #include "src/elements.h" | 
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 58               id); | 58               id); | 
| 59 } | 59 } | 
| 60 | 60 | 
| 61 RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) { | 61 RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) { | 
| 62   HandleScope scope(isolate); | 62   HandleScope scope(isolate); | 
| 63   DCHECK(args.length() == 0); | 63   DCHECK(args.length() == 0); | 
| 64   Handle<JSObject> holder = | 64   Handle<JSObject> holder = | 
| 65       isolate->factory()->NewJSObject(isolate->object_function()); | 65       isolate->factory()->NewJSObject(isolate->object_function()); | 
| 66 | 66 | 
| 67   InstallBuiltin(isolate, holder, "pop", Builtins::kArrayPop); | 67   InstallBuiltin(isolate, holder, "pop", Builtins::kArrayPop); | 
| 68   if (FLAG_minimal) { | 68   InstallBuiltin(isolate, holder, "push", Builtins::kFastArrayPush); | 
| 69     InstallBuiltin(isolate, holder, "push", Builtins::kArrayPush); |  | 
| 70   } else { |  | 
| 71     FastArrayPushStub stub(isolate); |  | 
| 72     InstallCode(isolate, holder, "push", stub.GetCode()); |  | 
| 73   } |  | 
| 74   InstallBuiltin(isolate, holder, "shift", Builtins::kArrayShift); | 69   InstallBuiltin(isolate, holder, "shift", Builtins::kArrayShift); | 
| 75   InstallBuiltin(isolate, holder, "unshift", Builtins::kArrayUnshift); | 70   InstallBuiltin(isolate, holder, "unshift", Builtins::kArrayUnshift); | 
| 76   InstallBuiltin(isolate, holder, "slice", Builtins::kArraySlice); | 71   InstallBuiltin(isolate, holder, "slice", Builtins::kArraySlice); | 
| 77   InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice); | 72   InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice); | 
| 78   InstallBuiltin(isolate, holder, "includes", Builtins::kArrayIncludes, 2); | 73   InstallBuiltin(isolate, holder, "includes", Builtins::kArrayIncludes, 2); | 
| 79   InstallBuiltin(isolate, holder, "indexOf", Builtins::kArrayIndexOf, 2); | 74   InstallBuiltin(isolate, holder, "indexOf", Builtins::kArrayIndexOf, 2); | 
| 80   InstallBuiltin(isolate, holder, "keys", Builtins::kArrayPrototypeKeys, 0, | 75   InstallBuiltin(isolate, holder, "keys", Builtins::kArrayPrototypeKeys, 0, | 
| 81                  kArrayKeys); | 76                  kArrayKeys); | 
| 82   InstallBuiltin(isolate, holder, "values", Builtins::kArrayPrototypeValues, 0, | 77   InstallBuiltin(isolate, holder, "values", Builtins::kArrayPrototypeValues, 0, | 
| 83                  kArrayValues); | 78                  kArrayValues); | 
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 673   ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 668   ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 
| 674       isolate, spreaded, | 669       isolate, spreaded, | 
| 675       Execution::Call(isolate, spread_iterable_function, | 670       Execution::Call(isolate, spread_iterable_function, | 
| 676                       isolate->factory()->undefined_value(), 1, &spread)); | 671                       isolate->factory()->undefined_value(), 1, &spread)); | 
| 677 | 672 | 
| 678   return *spreaded; | 673   return *spreaded; | 
| 679 } | 674 } | 
| 680 | 675 | 
| 681 }  // namespace internal | 676 }  // namespace internal | 
| 682 }  // namespace v8 | 677 }  // namespace v8 | 
| OLD | NEW | 
|---|