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

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

Issue 361004: Remove TODO comments in code generation for typeof subexpressions.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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/codegen-arm.cc ('k') | src/x64/codegen-x64.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 540
541 void CodeGenerator::LoadTypeofExpression(Expression* expr) { 541 void CodeGenerator::LoadTypeofExpression(Expression* expr) {
542 // Special handling of identifiers as subexpressions of typeof. 542 // Special handling of identifiers as subexpressions of typeof.
543 Variable* variable = expr->AsVariableProxy()->AsVariable(); 543 Variable* variable = expr->AsVariableProxy()->AsVariable();
544 if (variable != NULL && !variable->is_this() && variable->is_global()) { 544 if (variable != NULL && !variable->is_this() && variable->is_global()) {
545 // For a global variable we build the property reference 545 // For a global variable we build the property reference
546 // <global>.<variable> and perform a (regular non-contextual) property 546 // <global>.<variable> and perform a (regular non-contextual) property
547 // load to make sure we do not get reference errors. 547 // load to make sure we do not get reference errors.
548 Slot global(variable, Slot::CONTEXT, Context::GLOBAL_INDEX); 548 Slot global(variable, Slot::CONTEXT, Context::GLOBAL_INDEX);
549 Literal key(variable->name()); 549 Literal key(variable->name());
550 // TODO(1241834): Fetch the position from the variable instead of using
551 // no position.
552 Property property(&global, &key, RelocInfo::kNoPosition); 550 Property property(&global, &key, RelocInfo::kNoPosition);
553 Reference ref(this, &property); 551 Reference ref(this, &property);
554 ref.GetValue(); 552 ref.GetValue();
555 } else if (variable != NULL && variable->slot() != NULL) { 553 } else if (variable != NULL && variable->slot() != NULL) {
556 // For a variable that rewrites to a slot, we signal it is the immediate 554 // For a variable that rewrites to a slot, we signal it is the immediate
557 // subexpression of a typeof. 555 // subexpression of a typeof.
558 LoadFromSlotCheckForArguments(variable->slot(), INSIDE_TYPEOF); 556 LoadFromSlotCheckForArguments(variable->slot(), INSIDE_TYPEOF);
559 } else { 557 } else {
560 // Anything else can be handled normally. 558 // Anything else can be handled normally.
561 Load(expr); 559 Load(expr);
(...skipping 7551 matching lines...) Expand 10 before | Expand all | Expand 10 after
8113 8111
8114 int CompareStub::MinorKey() { 8112 int CompareStub::MinorKey() {
8115 // Encode the two parameters in a unique 16 bit value. 8113 // Encode the two parameters in a unique 16 bit value.
8116 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); 8114 ASSERT(static_cast<unsigned>(cc_) < (1 << 15));
8117 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); 8115 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0);
8118 } 8116 }
8119 8117
8120 #undef __ 8118 #undef __
8121 8119
8122 } } // namespace v8::internal 8120 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698