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

Side by Side Diff: src/runtime.cc

Issue 251383003: Revert "*NumberDictionary::AtNumberPut() handlified." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | src/type-info.cc » ('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 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 9961 matching lines...) Expand 10 before | Expand all | Expand 10 after
9972 // getters on the arrays increasing the length of later arrays 9972 // getters on the arrays increasing the length of later arrays
9973 // during iteration. 9973 // during iteration.
9974 // This shouldn't happen in anything but pathological cases. 9974 // This shouldn't happen in anything but pathological cases.
9975 SetDictionaryMode(index); 9975 SetDictionaryMode(index);
9976 // Fall-through to dictionary mode. 9976 // Fall-through to dictionary mode.
9977 } 9977 }
9978 ASSERT(!fast_elements_); 9978 ASSERT(!fast_elements_);
9979 Handle<SeededNumberDictionary> dict( 9979 Handle<SeededNumberDictionary> dict(
9980 SeededNumberDictionary::cast(*storage_)); 9980 SeededNumberDictionary::cast(*storage_));
9981 Handle<SeededNumberDictionary> result = 9981 Handle<SeededNumberDictionary> result =
9982 SeededNumberDictionary::AtNumberPut(dict, index, elm); 9982 isolate_->factory()->DictionaryAtNumberPut(dict, index, elm);
9983 if (!result.is_identical_to(dict)) { 9983 if (!result.is_identical_to(dict)) {
9984 // Dictionary needed to grow. 9984 // Dictionary needed to grow.
9985 clear_storage(); 9985 clear_storage();
9986 set_storage(*result); 9986 set_storage(*result);
9987 } 9987 }
9988 } 9988 }
9989 9989
9990 void increase_index_offset(uint32_t delta) { 9990 void increase_index_offset(uint32_t delta) {
9991 if (JSObject::kMaxElementCount - index_offset_ < delta) { 9991 if (JSObject::kMaxElementCount - index_offset_ < delta) {
9992 index_offset_ = JSObject::kMaxElementCount; 9992 index_offset_ = JSObject::kMaxElementCount;
(...skipping 29 matching lines...) Expand all
10022 Handle<FixedArray> current_storage(*storage_); 10022 Handle<FixedArray> current_storage(*storage_);
10023 Handle<SeededNumberDictionary> slow_storage( 10023 Handle<SeededNumberDictionary> slow_storage(
10024 isolate_->factory()->NewSeededNumberDictionary( 10024 isolate_->factory()->NewSeededNumberDictionary(
10025 current_storage->length())); 10025 current_storage->length()));
10026 uint32_t current_length = static_cast<uint32_t>(current_storage->length()); 10026 uint32_t current_length = static_cast<uint32_t>(current_storage->length());
10027 for (uint32_t i = 0; i < current_length; i++) { 10027 for (uint32_t i = 0; i < current_length; i++) {
10028 HandleScope loop_scope(isolate_); 10028 HandleScope loop_scope(isolate_);
10029 Handle<Object> element(current_storage->get(i), isolate_); 10029 Handle<Object> element(current_storage->get(i), isolate_);
10030 if (!element->IsTheHole()) { 10030 if (!element->IsTheHole()) {
10031 Handle<SeededNumberDictionary> new_storage = 10031 Handle<SeededNumberDictionary> new_storage =
10032 SeededNumberDictionary::AtNumberPut(slow_storage, i, element); 10032 isolate_->factory()->DictionaryAtNumberPut(slow_storage, i, element);
10033 if (!new_storage.is_identical_to(slow_storage)) { 10033 if (!new_storage.is_identical_to(slow_storage)) {
10034 slow_storage = loop_scope.CloseAndEscape(new_storage); 10034 slow_storage = loop_scope.CloseAndEscape(new_storage);
10035 } 10035 }
10036 } 10036 }
10037 } 10037 }
10038 clear_storage(); 10038 clear_storage();
10039 set_storage(*slow_storage); 10039 set_storage(*slow_storage);
10040 fast_elements_ = false; 10040 fast_elements_ = false;
10041 } 10041 }
10042 10042
(...skipping 5081 matching lines...) Expand 10 before | Expand all | Expand 10 after
15124 } 15124 }
15125 return NULL; 15125 return NULL;
15126 } 15126 }
15127 15127
15128 15128
15129 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15129 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15130 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15130 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15131 } 15131 }
15132 15132
15133 } } // namespace v8::internal 15133 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698