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

Unified Diff: src/runtime.cc

Issue 364853009: Implement ES6 Array.of() (Closed) Base URL: https://github.com/v8/v8@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 893e31be5cd740e8d28192a4799c9cd59d614bf5..69269c78f31fcdd9ca40022333691afca77b246c 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -7804,6 +7804,18 @@ RUNTIME_FUNCTION(Runtime_MathPowRT) {
}
+RUNTIME_FUNCTION(Runtime_IsConstructor) {
rossberg 2014/07/08 08:39:17 Drive-by-comment: Unfortunately, I don't think thi
rossberg 2014/07/08 09:59:09 And more importantly, for JSFunctions it is testin
+ HandleScope scope(isolate);
+ ASSERT(args.length() == 1);
+
+ CONVERT_ARG_CHECKED(JSFunction, obj, 0);
+ if (!obj->IsObject()) return isolate->heap()->false_value();
+ bool hasConstructor = !!obj->GetConstructor();
+ return hasConstructor ? isolate->heap()->true_value()
+ : isolate->heap()->false_value();
+}
+
+
RUNTIME_FUNCTION(Runtime_RoundNumber) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
« src/harmony-array.js ('K') | « src/runtime.h ('k') | test/mjsunit/es6/array-of-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698