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

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

Issue 1288623003: [runtime] Remove useless %_IsUndetectableObject intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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') | src/v8natives.js » ('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/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 if (obj->IsNull()) return isolate->heap()->true_value(); 1365 if (obj->IsNull()) return isolate->heap()->true_value();
1366 if (obj->IsUndetectableObject()) return isolate->heap()->false_value(); 1366 if (obj->IsUndetectableObject()) return isolate->heap()->false_value();
1367 Map* map = HeapObject::cast(obj)->map(); 1367 Map* map = HeapObject::cast(obj)->map();
1368 bool is_non_callable_spec_object = 1368 bool is_non_callable_spec_object =
1369 map->instance_type() >= FIRST_NONCALLABLE_SPEC_OBJECT_TYPE && 1369 map->instance_type() >= FIRST_NONCALLABLE_SPEC_OBJECT_TYPE &&
1370 map->instance_type() <= LAST_NONCALLABLE_SPEC_OBJECT_TYPE; 1370 map->instance_type() <= LAST_NONCALLABLE_SPEC_OBJECT_TYPE;
1371 return isolate->heap()->ToBoolean(is_non_callable_spec_object); 1371 return isolate->heap()->ToBoolean(is_non_callable_spec_object);
1372 } 1372 }
1373 1373
1374 1374
1375 RUNTIME_FUNCTION(Runtime_IsUndetectableObject) {
1376 SealHandleScope shs(isolate);
1377 DCHECK(args.length() == 1);
1378 CONVERT_ARG_CHECKED(Object, obj, 0);
1379 return isolate->heap()->ToBoolean(obj->IsUndetectableObject());
1380 }
1381
1382
1383 RUNTIME_FUNCTION(Runtime_IsSpecObject) { 1375 RUNTIME_FUNCTION(Runtime_IsSpecObject) {
1384 SealHandleScope shs(isolate); 1376 SealHandleScope shs(isolate);
1385 DCHECK(args.length() == 1); 1377 DCHECK(args.length() == 1);
1386 CONVERT_ARG_CHECKED(Object, obj, 0); 1378 CONVERT_ARG_CHECKED(Object, obj, 0);
1387 return isolate->heap()->ToBoolean(obj->IsSpecObject()); 1379 return isolate->heap()->ToBoolean(obj->IsSpecObject());
1388 } 1380 }
1389 1381
1390 1382
1391 RUNTIME_FUNCTION(Runtime_IsStrong) { 1383 RUNTIME_FUNCTION(Runtime_IsStrong) {
1392 SealHandleScope shs(isolate); 1384 SealHandleScope shs(isolate);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 Handle<JSReceiver> receiver; 1437 Handle<JSReceiver> receiver;
1446 if (JSReceiver::ToObject(isolate, object).ToHandle(&receiver)) { 1438 if (JSReceiver::ToObject(isolate, object).ToHandle(&receiver)) {
1447 return *receiver; 1439 return *receiver;
1448 } 1440 }
1449 THROW_NEW_ERROR_RETURN_FAILURE( 1441 THROW_NEW_ERROR_RETURN_FAILURE(
1450 isolate, NewTypeError(MessageTemplate::kUndefinedOrNullToObject)); 1442 isolate, NewTypeError(MessageTemplate::kUndefinedOrNullToObject));
1451 } 1443 }
1452 1444
1453 } // namespace internal 1445 } // namespace internal
1454 } // namespace v8 1446 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698