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

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

Issue 807173002: ES6 computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug.h" 9 #include "src/debug.h"
10 #include "src/runtime/runtime.h" 10 #include "src/runtime/runtime.h"
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 } 1599 }
1600 1600
1601 1601
1602 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { 1602 RUNTIME_FUNCTION(RuntimeReference_ClassOf) {
1603 SealHandleScope shs(isolate); 1603 SealHandleScope shs(isolate);
1604 DCHECK(args.length() == 1); 1604 DCHECK(args.length() == 1);
1605 CONVERT_ARG_CHECKED(Object, obj, 0); 1605 CONVERT_ARG_CHECKED(Object, obj, 0);
1606 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); 1606 if (!obj->IsJSReceiver()) return isolate->heap()->null_value();
1607 return JSReceiver::cast(obj)->class_name(); 1607 return JSReceiver::cast(obj)->class_name();
1608 } 1608 }
1609
1610
1611 RUNTIME_FUNCTION(Runtime_DefineGetterPropertyUnchecked) {
1612 HandleScope scope(isolate);
1613 DCHECK(args.length() == 3);
1614 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
1615 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
1616 CONVERT_ARG_HANDLE_CHECKED(JSFunction, getter, 2);
1617
1618 RETURN_FAILURE_ON_EXCEPTION(
1619 isolate,
1620 JSObject::DefineAccessor(object, name, getter,
1621 isolate->factory()->null_value(), NONE));
1622 return isolate->heap()->undefined_value();
1623 }
1624
1625
1626 RUNTIME_FUNCTION(Runtime_DefineSetterPropertyUnchecked) {
1627 HandleScope scope(isolate);
1628 DCHECK(args.length() == 3);
1629 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
1630 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
1631 CONVERT_ARG_HANDLE_CHECKED(JSFunction, setter, 2);
1632
1633 RETURN_FAILURE_ON_EXCEPTION(
1634 isolate,
1635 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(),
1636 setter, NONE));
1637 return isolate->heap()->undefined_value();
1638 }
1609 } 1639 }
1610 } // namespace v8::internal 1640 } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698