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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 6793013: Cache optimized code on shared function info. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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/ia32/ic-ia32.cc ('k') | src/ia32/macro-assembler-ia32.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 void LCodeGen::WriteTranslation(LEnvironment* environment, 332 void LCodeGen::WriteTranslation(LEnvironment* environment,
333 Translation* translation) { 333 Translation* translation) {
334 if (environment == NULL) return; 334 if (environment == NULL) return;
335 335
336 // The translation includes one command per value in the environment. 336 // The translation includes one command per value in the environment.
337 int translation_size = environment->values()->length(); 337 int translation_size = environment->values()->length();
338 // The output frame height does not include the parameters. 338 // The output frame height does not include the parameters.
339 int height = translation_size - environment->parameter_count(); 339 int height = translation_size - environment->parameter_count();
340 340
341 WriteTranslation(environment->outer(), translation); 341 WriteTranslation(environment->outer(), translation);
342 int closure_id = DefineDeoptimizationLiteral(environment->closure()); 342 int closure_id = *info()->closure() != *environment->closure()
343 ? DefineDeoptimizationLiteral(environment->closure())
344 : Translation::kSelfLiteralId;
343 translation->BeginFrame(environment->ast_id(), closure_id, height); 345 translation->BeginFrame(environment->ast_id(), closure_id, height);
344 for (int i = 0; i < translation_size; ++i) { 346 for (int i = 0; i < translation_size; ++i) {
345 LOperand* value = environment->values()->at(i); 347 LOperand* value = environment->values()->at(i);
346 // spilled_registers_ and spilled_double_registers_ are either 348 // spilled_registers_ and spilled_double_registers_ are either
347 // both NULL or both set. 349 // both NULL or both set.
348 if (environment->spilled_registers() != NULL && value != NULL) { 350 if (environment->spilled_registers() != NULL && value != NULL) {
349 if (value->IsRegister() && 351 if (value->IsRegister() &&
350 environment->spilled_registers()[value->index()] != NULL) { 352 environment->spilled_registers()[value->index()] != NULL) {
351 translation->MarkDuplicate(); 353 translation->MarkDuplicate();
352 AddToTranslation(translation, 354 AddToTranslation(translation,
(...skipping 3763 matching lines...) Expand 10 before | Expand all | Expand 10 after
4116 ASSERT(osr_pc_offset_ == -1); 4118 ASSERT(osr_pc_offset_ == -1);
4117 osr_pc_offset_ = masm()->pc_offset(); 4119 osr_pc_offset_ = masm()->pc_offset();
4118 } 4120 }
4119 4121
4120 4122
4121 #undef __ 4123 #undef __
4122 4124
4123 } } // namespace v8::internal 4125 } } // namespace v8::internal
4124 4126
4125 #endif // V8_TARGET_ARCH_IA32 4127 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698