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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 20767002: Merge 15827, 15842, and 15912 into 3.19 (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.19
Patch Set: Final version Created 7 years, 4 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/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.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 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } else { 170 } else {
171 ASSERT(descriptor_->environment_length() == param_count); 171 ASSERT(descriptor_->environment_length() == param_count);
172 stack_parameter_count = graph()->GetConstantMinus1(); 172 stack_parameter_count = graph()->GetConstantMinus1();
173 arguments_length_ = graph()->GetConstant0(); 173 arguments_length_ = graph()->GetConstant0();
174 } 174 }
175 175
176 context_ = new(zone) HContext(); 176 context_ = new(zone) HContext();
177 AddInstruction(context_); 177 AddInstruction(context_);
178 start_environment->BindContext(context_); 178 start_environment->BindContext(context_);
179 179
180 AddSimulate(BailoutId::StubEntry()); 180 Add<HSimulate>(BailoutId::StubEntry());
181 181
182 NoObservableSideEffectsScope no_effects(this); 182 NoObservableSideEffectsScope no_effects(this);
183 183
184 HValue* return_value = BuildCodeStub(); 184 HValue* return_value = BuildCodeStub();
185 185
186 // We might have extra expressions to pop from the stack in addition to the 186 // We might have extra expressions to pop from the stack in addition to the
187 // arguments above. 187 // arguments above.
188 HInstruction* stack_pop_count = stack_parameter_count; 188 HInstruction* stack_pop_count = stack_parameter_count;
189 if (descriptor_->function_mode_ == JS_FUNCTION_STUB_MODE) { 189 if (descriptor_->function_mode_ == JS_FUNCTION_STUB_MODE) {
190 if (!stack_parameter_count->IsConstant() && 190 if (!stack_parameter_count->IsConstant() &&
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 length)); 353 length));
354 } else { 354 } else {
355 ElementsKind elements_kind = casted_stub()->ComputeElementsKind(); 355 ElementsKind elements_kind = casted_stub()->ComputeElementsKind();
356 environment()->Push(BuildCloneShallowArray(context(), 356 environment()->Push(BuildCloneShallowArray(context(),
357 boilerplate, 357 boilerplate,
358 alloc_site_mode, 358 alloc_site_mode,
359 elements_kind, 359 elements_kind,
360 length)); 360 length));
361 } 361 }
362 362
363 HValue* result = environment()->Pop();
364 checker.ElseDeopt(); 363 checker.ElseDeopt();
365 return result; 364 checker.End();
365
366 return environment()->Pop();
366 } 367 }
367 368
368 369
369 Handle<Code> FastCloneShallowArrayStub::GenerateCode() { 370 Handle<Code> FastCloneShallowArrayStub::GenerateCode() {
370 return DoGenerateCode(this); 371 return DoGenerateCode(this);
371 } 372 }
372 373
373 374
374 template <> 375 template <>
375 HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() { 376 HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() {
(...skipping 26 matching lines...) Expand all
402 } 403 }
403 404
404 HInstruction* object = AddInstruction(new(zone) 405 HInstruction* object = AddInstruction(new(zone)
405 HAllocate(context(), size_in_bytes, HType::JSObject(), flags)); 406 HAllocate(context(), size_in_bytes, HType::JSObject(), flags));
406 407
407 for (int i = 0; i < size; i += kPointerSize) { 408 for (int i = 0; i < size; i += kPointerSize) {
408 HObjectAccess access = HObjectAccess::ForJSObjectOffset(i); 409 HObjectAccess access = HObjectAccess::ForJSObjectOffset(i);
409 AddStore(object, access, AddLoad(boilerplate, access)); 410 AddStore(object, access, AddLoad(boilerplate, access));
410 } 411 }
411 412
413 environment()->Push(object);
412 checker.ElseDeopt(); 414 checker.ElseDeopt();
413 return object; 415 checker.End();
416
417 return environment()->Pop();
414 } 418 }
415 419
416 420
417 Handle<Code> FastCloneShallowObjectStub::GenerateCode() { 421 Handle<Code> FastCloneShallowObjectStub::GenerateCode() {
418 return DoGenerateCode(this); 422 return DoGenerateCode(this);
419 } 423 }
420 424
421 425
422 template <> 426 template <>
423 HValue* CodeStubGraphBuilder<KeyedLoadFastElementStub>::BuildCodeStub() { 427 HValue* CodeStubGraphBuilder<KeyedLoadFastElementStub>::BuildCodeStub() {
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 return graph()->GetConstant0(); 772 return graph()->GetConstant0();
769 } 773 }
770 774
771 775
772 Handle<Code> ToBooleanStub::GenerateCode() { 776 Handle<Code> ToBooleanStub::GenerateCode() {
773 return DoGenerateCode(this); 777 return DoGenerateCode(this);
774 } 778 }
775 779
776 780
777 } } // namespace v8::internal 781 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698