 Chromium Code Reviews
 Chromium Code Reviews Issue 10802039:
  Don't record elements transition slots since it will contain a map.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 10802039:
  Don't record elements transition slots since it will contain a map.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| OLD | NEW | 
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright | 
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. | 
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above | 
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following | 
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided | 
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 | 62 | 
| 63 | 63 | 
| 64 static bool InsertionPointFound(String* key1, String* key2) { | 64 static bool InsertionPointFound(String* key1, String* key2) { | 
| 65 return key1->Hash() > key2->Hash(); | 65 return key1->Hash() > key2->Hash(); | 
| 66 } | 66 } | 
| 67 | 67 | 
| 68 | 68 | 
| 69 MaybeObject* TransitionArray::NewWith(String* name, Map* target) { | 69 MaybeObject* TransitionArray::NewWith(String* name, Map* target) { | 
| 70 TransitionArray* result; | 70 TransitionArray* result; | 
| 71 | 71 | 
| 72 { MaybeObject* maybe_array; | 72 MaybeObject* maybe_array; | 
| 73 maybe_array = TransitionArray::Allocate(1); | 73 maybe_array = TransitionArray::Allocate(1); | 
| 
Michael Starzinger
2012/07/19 21:09:02
Merge the above two lines into one.
 | |
| 74 if (!maybe_array->To(&result)) return maybe_array; | 74 if (!maybe_array->To(&result)) return maybe_array; | 
| 75 } | |
| 76 | 75 | 
| 77 FixedArray::WhitenessWitness witness(result); | 76 FixedArray::WhitenessWitness witness(result); | 
| 78 | 77 | 
| 79 result->Set(0, name, target, witness); | 78 result->Set(0, name, target, witness); | 
| 80 return result; | 79 return result; | 
| 81 } | 80 } | 
| 82 | 81 | 
| 83 | 82 | 
| 84 MaybeObject* TransitionArray::CopyInsert(String* name, Map* target) { | 83 MaybeObject* TransitionArray::CopyInsert(String* name, Map* target) { | 
| 85 TransitionArray* result; | 84 TransitionArray* result; | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 122 | 121 | 
| 123 for (; insertion_index < number_of_transitions; ++insertion_index) { | 122 for (; insertion_index < number_of_transitions; ++insertion_index) { | 
| 124 result->CopyFrom(this, insertion_index, insertion_index + 1, witness); | 123 result->CopyFrom(this, insertion_index, insertion_index + 1, witness); | 
| 125 } | 124 } | 
| 126 | 125 | 
| 127 return result; | 126 return result; | 
| 128 } | 127 } | 
| 129 | 128 | 
| 130 | 129 | 
| 131 } } // namespace v8::internal | 130 } } // namespace v8::internal | 
| OLD | NEW |