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

Unified Diff: src/runtime.cc

Issue 294022: Add optimized ICs for new CanvasArray types. This is a follow-on CL to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « src/objects.cc ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
===================================================================
--- src/runtime.cc (revision 3112)
+++ src/runtime.cc (working copy)
@@ -2580,18 +2580,6 @@
return GetElementOrCharAt(object, index);
}
- // If the target object is a JSObject and has an ExternalArray as
- // its elements, we need to check for negative indices and report
- // exceptions. Indices larger than the array's length will be caught
- // elsewhere.
- if (key->IsSmi() && Smi::cast(*key)->value() < 0) {
- if (object->IsJSObject() &&
- JSObject::cast(*object)->HasExternalArrayElements()) {
- uint32_t index = static_cast<uint32_t>(Smi::cast(*key)->value());
- return Top::Throw(*Factory::NewIndexError(index));
- }
- }
-
// Convert the key to a string - possibly by calling back into JavaScript.
Handle<String> name;
if (key->IsString()) {
@@ -2726,18 +2714,6 @@
return *value;
}
- // If the target object is a JSObject and has an ExternalArray as
- // its elements, we need to check for negative indices and report
- // exceptions. Indices larger than the array's length will be caught
- // elsewhere.
- if (key->IsSmi() && Smi::cast(*key)->value() < 0) {
- if (object->IsJSObject() &&
- JSObject::cast(*object)->HasExternalArrayElements()) {
- uint32_t index = static_cast<uint32_t>(Smi::cast(*key)->value());
- return Top::Throw(*Factory::NewIndexError(index));
- }
- }
-
if (key->IsString()) {
Handle<Object> result;
if (Handle<String>::cast(key)->AsArrayIndex(&index)) {
« no previous file with comments | « src/objects.cc ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698