Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Version 2.1.3.1

Merge r4094 to trunk.

BUG=http://crbug.com/37853

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/873001

git-svn-id: https://v8.googlecode.com/svn/trunk@4095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
  • Loading branch information...
commit e6e1fc10aa3e9c9923f9e5af8f9a405b34d6c0f4 1 parent 51fe433
sgjesse@chromium.org authored
2  src/ic.cc
@@ -150,7 +150,7 @@ IC::State IC::StateFrom(Code* target, Object* receiver, Object* name) {
150 150 // the receiver map's code cache. Therefore, if the current target
151 151 // is in the receiver map's code cache, the inline cache failed due
152 152 // to prototype check failure.
153   - int index = map->IndexInCodeCache(String::cast(name), target);
  153 + int index = map->IndexInCodeCache(name, target);
154 154 if (index >= 0) {
155 155 // For keyed load/store, the most likely cause of cache failure is
156 156 // that the key has changed. We do not distinguish between
11 src/objects.cc
@@ -3055,7 +3055,7 @@ Object* Map::FindInCodeCache(String* name, Code::Flags flags) {
3055 3055 }
3056 3056
3057 3057
3058   -int Map::IndexInCodeCache(String* name, Code* code) {
  3058 +int Map::IndexInCodeCache(Object* name, Code* code) {
3059 3059 // Get the internal index if a code cache exists.
3060 3060 if (!code_cache()->IsFixedArray()) {
3061 3061 return CodeCache::cast(code_cache())->GetIndex(name, code);
@@ -3200,12 +3200,11 @@ Object* CodeCache::LookupNormalTypeCache(String* name, Code::Flags flags) {
3200 3200 }
3201 3201
3202 3202
3203   -int CodeCache::GetIndex(String* name, Code* code) {
3204   - // This is not used for normal load/store/call IC's.
  3203 +int CodeCache::GetIndex(Object* name, Code* code) {
3205 3204 if (code->type() == NORMAL) {
3206 3205 if (normal_type_cache()->IsUndefined()) return -1;
3207 3206 CodeCacheHashTable* cache = CodeCacheHashTable::cast(normal_type_cache());
3208   - return cache->GetIndex(name, code->flags());
  3207 + return cache->GetIndex(String::cast(name), code->flags());
3209 3208 }
3210 3209
3211 3210 FixedArray* array = default_cache();
@@ -3217,11 +3216,11 @@ int CodeCache::GetIndex(String* name, Code* code) {
3217 3216 }
3218 3217
3219 3218
3220   -void CodeCache::RemoveByIndex(String* name, Code* code, int index) {
  3219 +void CodeCache::RemoveByIndex(Object* name, Code* code, int index) {
3221 3220 if (code->type() == NORMAL) {
3222 3221 ASSERT(!normal_type_cache()->IsUndefined());
3223 3222 CodeCacheHashTable* cache = CodeCacheHashTable::cast(normal_type_cache());
3224   - ASSERT(cache->GetIndex(name, code->flags()) == index);
  3223 + ASSERT(cache->GetIndex(String::cast(name), code->flags()) == index);
3225 3224 cache->RemoveByIndex(index);
3226 3225 } else {
3227 3226 FixedArray* array = default_cache();
6 src/objects.h
@@ -2971,7 +2971,7 @@ class Map: public HeapObject {
2971 2971
2972 2972 // Returns the non-negative index of the code object if it is in the
2973 2973 // cache and -1 otherwise.
2974   - int IndexInCodeCache(String* name, Code* code);
  2974 + int IndexInCodeCache(Object* name, Code* code);
2975 2975
2976 2976 // Removes a code object from the code cache at the given index.
2977 2977 void RemoveFromCodeCache(String* name, Code* code, int index);
@@ -3743,10 +3743,10 @@ class CodeCache: public Struct {
3743 3743 // code object is not in that cache. This index can be used to later call
3744 3744 // RemoveByIndex. The cache cannot be modified between a call to GetIndex and
3745 3745 // RemoveByIndex.
3746   - int GetIndex(String* name, Code* code);
  3746 + int GetIndex(Object* name, Code* code);
3747 3747
3748 3748 // Remove an object from the cache with the provided internal index.
3749   - void RemoveByIndex(String* name, Code* code, int index);
  3749 + void RemoveByIndex(Object* name, Code* code, int index);
3750 3750
3751 3751 static inline CodeCache* cast(Object* obj);
3752 3752
2  src/version.cc
@@ -35,7 +35,7 @@
35 35 #define MAJOR_VERSION 2
36 36 #define MINOR_VERSION 1
37 37 #define BUILD_NUMBER 3
38   -#define PATCH_LEVEL 0
  38 +#define PATCH_LEVEL 1
39 39 #define CANDIDATE_VERSION false
40 40
41 41 // Define SONAME to have the SCons build the put a specific SONAME into the
34 test/mjsunit/regress/regress-crbug-37853.js
... ... @@ -0,0 +1,34 @@
  1 +// Copyright 2009 the V8 project authors. All rights reserved.
  2 +// Redistribution and use in source and binary forms, with or without
  3 +// modification, are permitted provided that the following conditions are
  4 +// met:
  5 +//
  6 +// * Redistributions of source code must retain the above copyright
  7 +// notice, this list of conditions and the following disclaimer.
  8 +// * Redistributions in binary form must reproduce the above
  9 +// copyright notice, this list of conditions and the following
  10 +// disclaimer in the documentation and/or other materials provided
  11 +// with the distribution.
  12 +// * Neither the name of Google Inc. nor the names of its
  13 +// contributors may be used to endorse or promote products derived
  14 +// from this software without specific prior written permission.
  15 +//
  16 +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  17 +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  18 +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  19 +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  20 +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  21 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  22 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  23 +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  24 +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  25 +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  26 +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27 +
  28 +// See http://crbug.com/37853
  29 +
  30 +function f(o, k) { return o[k]; }
  31 +a = {'a':1, 1:'a'}
  32 +f(a, 'a')
  33 +f(a, 'a')
  34 +f(a, 1);

0 comments on commit e6e1fc1

Please sign in to comment.
Something went wrong with that request. Please try again.