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

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

Issue 754863002: Optimize testing for an index's existence in packed Arrays (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: All fixed 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 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 } 1584 }
1585 1585
1586 1586
1587 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { 1587 RUNTIME_FUNCTION(RuntimeReference_ClassOf) {
1588 SealHandleScope shs(isolate); 1588 SealHandleScope shs(isolate);
1589 DCHECK(args.length() == 1); 1589 DCHECK(args.length() == 1);
1590 CONVERT_ARG_CHECKED(Object, obj, 0); 1590 CONVERT_ARG_CHECKED(Object, obj, 0);
1591 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); 1591 if (!obj->IsJSReceiver()) return isolate->heap()->null_value();
1592 return JSReceiver::cast(obj)->class_name(); 1592 return JSReceiver::cast(obj)->class_name();
1593 } 1593 }
1594
1595
1596 RUNTIME_FUNCTION(RuntimeReference_HasFastPackedElements) {
1597 SealHandleScope shs(isolate);
1598 DCHECK(args.length() == 1);
1599 CONVERT_ARG_CHECKED(HeapObject, obj, 0);
1600 return isolate->heap()->ToBoolean(
1601 IsFastPackedElementsKind(obj->map()->elements_kind()));
1602 }
1594 } 1603 }
1595 } // namespace v8::internal 1604 } // namespace v8::internal
OLDNEW
« src/runtime/runtime.h ('K') | « src/runtime/runtime.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698