| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <limits> | 6 #include <limits> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 } | 299 } |
| 300 | 300 |
| 301 | 301 |
| 302 RUNTIME_FUNCTION(Runtime_LoadKeyedFromSuper) { | 302 RUNTIME_FUNCTION(Runtime_LoadKeyedFromSuper) { |
| 303 HandleScope scope(isolate); | 303 HandleScope scope(isolate); |
| 304 DCHECK(args.length() == 3); | 304 DCHECK(args.length() == 3); |
| 305 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); | 305 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); |
| 306 CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); | 306 CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); |
| 307 CONVERT_ARG_HANDLE_CHECKED(Object, key, 2); | 307 CONVERT_ARG_HANDLE_CHECKED(Object, key, 2); |
| 308 | 308 |
| 309 uint32_t index; | 309 uint32_t index = 0; |
| 310 if (key->ToArrayIndex(&index)) { | 310 if (key->ToArrayIndex(&index)) { |
| 311 return LoadElementFromSuper(isolate, receiver, home_object, index); | 311 return LoadElementFromSuper(isolate, receiver, home_object, index); |
| 312 } | 312 } |
| 313 | 313 |
| 314 Handle<Name> name; | 314 Handle<Name> name; |
| 315 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, name, | 315 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, name, |
| 316 Runtime::ToName(isolate, key)); | 316 Runtime::ToName(isolate, key)); |
| 317 if (name->AsArrayIndex(&index)) { | 317 if (name->AsArrayIndex(&index)) { |
| 318 return LoadElementFromSuper(isolate, receiver, home_object, index); | 318 return LoadElementFromSuper(isolate, receiver, home_object, index); |
| 319 } | 319 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 CONVERT_ARG_HANDLE_CHECKED(Object, value, 3); | 387 CONVERT_ARG_HANDLE_CHECKED(Object, value, 3); |
| 388 | 388 |
| 389 return StoreToSuper(isolate, home_object, receiver, name, value, SLOPPY); | 389 return StoreToSuper(isolate, home_object, receiver, name, value, SLOPPY); |
| 390 } | 390 } |
| 391 | 391 |
| 392 | 392 |
| 393 static Object* StoreKeyedToSuper(Isolate* isolate, Handle<JSObject> home_object, | 393 static Object* StoreKeyedToSuper(Isolate* isolate, Handle<JSObject> home_object, |
| 394 Handle<Object> receiver, Handle<Object> key, | 394 Handle<Object> receiver, Handle<Object> key, |
| 395 Handle<Object> value, | 395 Handle<Object> value, |
| 396 LanguageMode language_mode) { | 396 LanguageMode language_mode) { |
| 397 uint32_t index; | 397 uint32_t index = 0; |
| 398 | 398 |
| 399 if (key->ToArrayIndex(&index)) { | 399 if (key->ToArrayIndex(&index)) { |
| 400 return StoreElementToSuper(isolate, home_object, receiver, index, value, | 400 return StoreElementToSuper(isolate, home_object, receiver, index, value, |
| 401 language_mode); | 401 language_mode); |
| 402 } | 402 } |
| 403 Handle<Name> name; | 403 Handle<Name> name; |
| 404 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, name, | 404 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, name, |
| 405 Runtime::ToName(isolate, key)); | 405 Runtime::ToName(isolate, key)); |
| 406 if (name->AsArrayIndex(&index)) { | 406 if (name->AsArrayIndex(&index)) { |
| 407 return StoreElementToSuper(isolate, home_object, receiver, index, value, | 407 return StoreElementToSuper(isolate, home_object, receiver, index, value, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 return nullptr; | 454 return nullptr; |
| 455 } | 455 } |
| 456 | 456 |
| 457 | 457 |
| 458 RUNTIME_FUNCTION(Runtime_CallSuperWithSpread) { | 458 RUNTIME_FUNCTION(Runtime_CallSuperWithSpread) { |
| 459 UNIMPLEMENTED(); | 459 UNIMPLEMENTED(); |
| 460 return nullptr; | 460 return nullptr; |
| 461 } | 461 } |
| 462 } // namespace internal | 462 } // namespace internal |
| 463 } // namespace v8 | 463 } // namespace v8 |
| OLD | NEW |