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

Side by Side Diff: src/objects.cc

Issue 227603004: Handlify deoptimization data allocators. (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.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 8211 matching lines...) Expand 10 before | Expand all | Expand 10 after
8222 return copy; 8222 return copy;
8223 } 8223 }
8224 8224
8225 8225
8226 Object* AccessorPair::GetComponent(AccessorComponent component) { 8226 Object* AccessorPair::GetComponent(AccessorComponent component) {
8227 Object* accessor = get(component); 8227 Object* accessor = get(component);
8228 return accessor->IsTheHole() ? GetHeap()->undefined_value() : accessor; 8228 return accessor->IsTheHole() ? GetHeap()->undefined_value() : accessor;
8229 } 8229 }
8230 8230
8231 8231
8232 MaybeObject* DeoptimizationInputData::Allocate(Isolate* isolate,
8233 int deopt_entry_count,
8234 PretenureFlag pretenure) {
8235 ASSERT(deopt_entry_count > 0);
8236 return isolate->heap()->AllocateFixedArray(LengthFor(deopt_entry_count),
8237 pretenure);
8238 }
8239
8240
8241 MaybeObject* DeoptimizationOutputData::Allocate(Isolate* isolate,
8242 int number_of_deopt_points,
8243 PretenureFlag pretenure) {
8244 if (number_of_deopt_points == 0) return isolate->heap()->empty_fixed_array();
8245 return isolate->heap()->AllocateFixedArray(
8246 LengthOfFixedArray(number_of_deopt_points), pretenure);
8247 }
8248
8249
8250 #ifdef DEBUG 8232 #ifdef DEBUG
8251 bool DescriptorArray::IsEqualTo(DescriptorArray* other) { 8233 bool DescriptorArray::IsEqualTo(DescriptorArray* other) {
8252 if (IsEmpty()) return other->IsEmpty(); 8234 if (IsEmpty()) return other->IsEmpty();
8253 if (other->IsEmpty()) return false; 8235 if (other->IsEmpty()) return false;
8254 if (length() != other->length()) return false; 8236 if (length() != other->length()) return false;
8255 for (int i = 0; i < length(); ++i) { 8237 for (int i = 0; i < length(); ++i) {
8256 if (get(i) != other->get(i)) return false; 8238 if (get(i) != other->get(i)) return false;
8257 } 8239 }
8258 return true; 8240 return true;
8259 } 8241 }
(...skipping 8422 matching lines...) Expand 10 before | Expand all | Expand 10 after
16682 #define ERROR_MESSAGES_TEXTS(C, T) T, 16664 #define ERROR_MESSAGES_TEXTS(C, T) T,
16683 static const char* error_messages_[] = { 16665 static const char* error_messages_[] = {
16684 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16666 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16685 }; 16667 };
16686 #undef ERROR_MESSAGES_TEXTS 16668 #undef ERROR_MESSAGES_TEXTS
16687 return error_messages_[reason]; 16669 return error_messages_[reason];
16688 } 16670 }
16689 16671
16690 16672
16691 } } // namespace v8::internal 16673 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698