Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: src/runtime/runtime-classes.cc

Issue 917753002: new classes: implement default constructors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase to run try jobs Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 DCHECK(args.length() == 4); 407 DCHECK(args.length() == 4);
408 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); 408 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
409 CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); 409 CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
410 CONVERT_ARG_HANDLE_CHECKED(Object, key, 2); 410 CONVERT_ARG_HANDLE_CHECKED(Object, key, 2);
411 CONVERT_ARG_HANDLE_CHECKED(Object, value, 3); 411 CONVERT_ARG_HANDLE_CHECKED(Object, value, 3);
412 412
413 return StoreKeyedToSuper(isolate, home_object, receiver, key, value, SLOPPY); 413 return StoreKeyedToSuper(isolate, home_object, receiver, key, value, SLOPPY);
414 } 414 }
415 415
416 416
417 RUNTIME_FUNCTION(RuntimeReference_DefaultConstructorCallSuper) {
418 UNREACHABLE();
419 return nullptr;
420 }
421
422
423 // TODO(dslomov): deprecated, will remove when experimenal classes is default.
417 RUNTIME_FUNCTION(Runtime_DefaultConstructorSuperCall) { 424 RUNTIME_FUNCTION(Runtime_DefaultConstructorSuperCall) {
425 CHECK(!FLAG_experimental_classes);
418 HandleScope scope(isolate); 426 HandleScope scope(isolate);
419 DCHECK(args.length() == 0); 427 DCHECK(args.length() == 0);
420 428
421 // Compute the frame holding the arguments. 429 // Compute the frame holding the arguments.
422 JavaScriptFrameIterator it(isolate); 430 JavaScriptFrameIterator it(isolate);
423 it.AdvanceToArgumentsFrame(); 431 it.AdvanceToArgumentsFrame();
424 JavaScriptFrame* frame = it.frame(); 432 JavaScriptFrame* frame = it.frame();
425 433
426 Handle<JSFunction> function(frame->function(), isolate); 434 Handle<JSFunction> function(frame->function(), isolate);
427 Handle<Object> receiver(frame->receiver(), isolate); 435 Handle<Object> receiver(frame->receiver(), isolate);
(...skipping 26 matching lines...) Expand all
454 } 462 }
455 463
456 Handle<Object> result; 464 Handle<Object> result;
457 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 465 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
458 isolate, result, 466 isolate, result,
459 Execution::Call(isolate, proto_function, receiver, argc, argv, false)); 467 Execution::Call(isolate, proto_function, receiver, argc, argv, false));
460 return *result; 468 return *result;
461 } 469 }
462 } 470 }
463 } // namespace v8::internal 471 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/x64/code-stubs-x64.cc » ('j') | src/x64/code-stubs-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698