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

Side by Side Diff: src/hydrogen.cc

Issue 24374002: Revert "Handlify JSObject::MigrateInstance and friends." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/objects.h » ('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 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 4088 matching lines...) Expand 10 before | Expand all | Expand 10 after
4099 4099
4100 4100
4101 // Determines whether the given array or object literal boilerplate satisfies 4101 // Determines whether the given array or object literal boilerplate satisfies
4102 // all limits to be considered for fast deep-copying and computes the total 4102 // all limits to be considered for fast deep-copying and computes the total
4103 // size of all objects that are part of the graph. 4103 // size of all objects that are part of the graph.
4104 static bool IsFastLiteral(Handle<JSObject> boilerplate, 4104 static bool IsFastLiteral(Handle<JSObject> boilerplate,
4105 int max_depth, 4105 int max_depth,
4106 int* max_properties) { 4106 int* max_properties) {
4107 if (boilerplate->map()->is_deprecated()) { 4107 if (boilerplate->map()->is_deprecated()) {
4108 Handle<Object> result = JSObject::TryMigrateInstance(boilerplate); 4108 Handle<Object> result = JSObject::TryMigrateInstance(boilerplate);
4109 if (result.is_null()) return false; 4109 if (result->IsSmi()) return false;
4110 } 4110 }
4111 4111
4112 ASSERT(max_depth >= 0 && *max_properties >= 0); 4112 ASSERT(max_depth >= 0 && *max_properties >= 0);
4113 if (max_depth == 0) return false; 4113 if (max_depth == 0) return false;
4114 4114
4115 Isolate* isolate = boilerplate->GetIsolate(); 4115 Isolate* isolate = boilerplate->GetIsolate();
4116 Handle<FixedArrayBase> elements(boilerplate->elements()); 4116 Handle<FixedArrayBase> elements(boilerplate->elements());
4117 if (elements->length() > 0 && 4117 if (elements->length() > 0 &&
4118 elements->map() != isolate->heap()->fixed_cow_array_map()) { 4118 elements->map() != isolate->heap()->fixed_cow_array_map()) {
4119 if (boilerplate->HasFastObjectElements()) { 4119 if (boilerplate->HasFastObjectElements()) {
(...skipping 5654 matching lines...) Expand 10 before | Expand all | Expand 10 after
9774 if (ShouldProduceTraceOutput()) { 9774 if (ShouldProduceTraceOutput()) {
9775 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9775 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9776 } 9776 }
9777 9777
9778 #ifdef DEBUG 9778 #ifdef DEBUG
9779 graph_->Verify(false); // No full verify. 9779 graph_->Verify(false); // No full verify.
9780 #endif 9780 #endif
9781 } 9781 }
9782 9782
9783 } } // namespace v8::internal 9783 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698