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

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

Issue 1010973010: Added %_HeapObjectGetMap and %_MapGetInstanceType intrinsics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Renamed Created 5 years, 9 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
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/compiler/test-run-intrinsics.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 1499
1500 1500
1501 RUNTIME_FUNCTION(Runtime_JSValueGetValue) { 1501 RUNTIME_FUNCTION(Runtime_JSValueGetValue) {
1502 SealHandleScope shs(isolate); 1502 SealHandleScope shs(isolate);
1503 DCHECK(args.length() == 1); 1503 DCHECK(args.length() == 1);
1504 CONVERT_ARG_CHECKED(JSValue, obj, 0); 1504 CONVERT_ARG_CHECKED(JSValue, obj, 0);
1505 return JSValue::cast(obj)->value(); 1505 return JSValue::cast(obj)->value();
1506 } 1506 }
1507 1507
1508 1508
1509 RUNTIME_FUNCTION(Runtime_HeapObjectGetMap) {
1510 SealHandleScope shs(isolate);
1511 DCHECK(args.length() == 1);
1512 CONVERT_ARG_CHECKED(HeapObject, obj, 0);
1513 return obj->map();
1514 }
1515
1516
1517 RUNTIME_FUNCTION(Runtime_MapGetInstanceType) {
1518 SealHandleScope shs(isolate);
1519 DCHECK(args.length() == 1);
1520 CONVERT_ARG_CHECKED(Map, map, 0);
1521 return Smi::FromInt(map->instance_type());
1522 }
1523
1524
1509 RUNTIME_FUNCTION(Runtime_ObjectEquals) { 1525 RUNTIME_FUNCTION(Runtime_ObjectEquals) {
1510 SealHandleScope shs(isolate); 1526 SealHandleScope shs(isolate);
1511 DCHECK(args.length() == 2); 1527 DCHECK(args.length() == 2);
1512 CONVERT_ARG_CHECKED(Object, obj1, 0); 1528 CONVERT_ARG_CHECKED(Object, obj1, 0);
1513 CONVERT_ARG_CHECKED(Object, obj2, 1); 1529 CONVERT_ARG_CHECKED(Object, obj2, 1);
1514 return isolate->heap()->ToBoolean(obj1 == obj2); 1530 return isolate->heap()->ToBoolean(obj1 == obj2);
1515 } 1531 }
1516 1532
1517 1533
1518 RUNTIME_FUNCTION(Runtime_IsObject) { 1534 RUNTIME_FUNCTION(Runtime_IsObject) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); 1596 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3);
1581 1597
1582 RETURN_FAILURE_ON_EXCEPTION( 1598 RETURN_FAILURE_ON_EXCEPTION(
1583 isolate, 1599 isolate,
1584 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(), 1600 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(),
1585 setter, attrs)); 1601 setter, attrs));
1586 return isolate->heap()->undefined_value(); 1602 return isolate->heap()->undefined_value();
1587 } 1603 }
1588 } 1604 }
1589 } // namespace v8::internal 1605 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/compiler/test-run-intrinsics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698