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

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

Issue 1680513002: [runtime] We don't need an actual instance type for JSIteratorResult. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 "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/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 return isolate->heap()->ToBoolean(result.FromJust()); 1263 return isolate->heap()->ToBoolean(result.FromJust());
1264 } 1264 }
1265 1265
1266 1266
1267 // ES6 section 7.4.7 CreateIterResultObject ( value, done ) 1267 // ES6 section 7.4.7 CreateIterResultObject ( value, done )
1268 RUNTIME_FUNCTION(Runtime_CreateIterResultObject) { 1268 RUNTIME_FUNCTION(Runtime_CreateIterResultObject) {
1269 HandleScope scope(isolate); 1269 HandleScope scope(isolate);
1270 DCHECK_EQ(2, args.length()); 1270 DCHECK_EQ(2, args.length());
1271 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); 1271 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0);
1272 CONVERT_ARG_HANDLE_CHECKED(Object, done, 1); 1272 CONVERT_ARG_HANDLE_CHECKED(Object, done, 1);
1273 return *isolate->factory()->NewJSIteratorResult(value, done); 1273 Handle<JSObject> result =
1274 isolate->factory()->NewJSObjectFromMap(isolate->iterator_result_map());
1275 result->InObjectPropertyAtPut(JSIteratorResult::kValueIndex, *value);
1276 result->InObjectPropertyAtPut(JSIteratorResult::kDoneIndex, *done);
1277 return *result;
1274 } 1278 }
1275 1279
1276 1280
1277 RUNTIME_FUNCTION(Runtime_IsAccessCheckNeeded) { 1281 RUNTIME_FUNCTION(Runtime_IsAccessCheckNeeded) {
1278 SealHandleScope shs(isolate); 1282 SealHandleScope shs(isolate);
1279 DCHECK_EQ(1, args.length()); 1283 DCHECK_EQ(1, args.length());
1280 CONVERT_ARG_CHECKED(Object, object, 0); 1284 CONVERT_ARG_CHECKED(Object, object, 0);
1281 return isolate->heap()->ToBoolean(object->IsAccessCheckNeeded()); 1285 return isolate->heap()->ToBoolean(object->IsAccessCheckNeeded());
1282 } 1286 }
1283 1287
(...skipping 13 matching lines...) Expand all
1297 DCHECK(args.length() == 2); 1301 DCHECK(args.length() == 2);
1298 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0); 1302 CONVERT_ARG_HANDLE_CHECKED(Object, o, 0);
1299 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1); 1303 CONVERT_ARG_HANDLE_CHECKED(Object, properties, 1);
1300 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 1304 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
1301 isolate, o, JSReceiver::DefineProperties(isolate, o, properties)); 1305 isolate, o, JSReceiver::DefineProperties(isolate, o, properties));
1302 return *o; 1306 return *o;
1303 } 1307 }
1304 1308
1305 } // namespace internal 1309 } // namespace internal
1306 } // namespace v8 1310 } // namespace v8
OLDNEW
« src/objects.h ('K') | « src/objects-printer.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698