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

Side by Side Diff: src/x64/codegen-x64.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/ia32/codegen-ia32.cc ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 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 4794 matching lines...) Expand 10 before | Expand all | Expand 10 after
4805 4805
4806 void CodeGenerator::LoadTypeofExpression(Expression* expr) { 4806 void CodeGenerator::LoadTypeofExpression(Expression* expr) {
4807 // Special handling of identifiers as subexpressions of typeof. 4807 // Special handling of identifiers as subexpressions of typeof.
4808 Variable* variable = expr->AsVariableProxy()->AsVariable(); 4808 Variable* variable = expr->AsVariableProxy()->AsVariable();
4809 if (variable != NULL && !variable->is_this() && variable->is_global()) { 4809 if (variable != NULL && !variable->is_this() && variable->is_global()) {
4810 // For a global variable we build the property reference 4810 // For a global variable we build the property reference
4811 // <global>.<variable> and perform a (regular non-contextual) property 4811 // <global>.<variable> and perform a (regular non-contextual) property
4812 // load to make sure we do not get reference errors. 4812 // load to make sure we do not get reference errors.
4813 Slot global(variable, Slot::CONTEXT, Context::GLOBAL_INDEX); 4813 Slot global(variable, Slot::CONTEXT, Context::GLOBAL_INDEX);
4814 Literal key(variable->name()); 4814 Literal key(variable->name());
4815 // TODO(1241834): Fetch the position from the variable instead of using
4816 // no position.
4817 Property property(&global, &key, RelocInfo::kNoPosition); 4815 Property property(&global, &key, RelocInfo::kNoPosition);
4818 Reference ref(this, &property); 4816 Reference ref(this, &property);
4819 ref.GetValue(); 4817 ref.GetValue();
4820 } else if (variable != NULL && variable->slot() != NULL) { 4818 } else if (variable != NULL && variable->slot() != NULL) {
4821 // For a variable that rewrites to a slot, we signal it is the immediate 4819 // For a variable that rewrites to a slot, we signal it is the immediate
4822 // subexpression of a typeof. 4820 // subexpression of a typeof.
4823 LoadFromSlotCheckForArguments(variable->slot(), INSIDE_TYPEOF); 4821 LoadFromSlotCheckForArguments(variable->slot(), INSIDE_TYPEOF);
4824 } else { 4822 } else {
4825 // Anything else can be handled normally. 4823 // Anything else can be handled normally.
4826 Load(expr); 4824 Load(expr);
(...skipping 3015 matching lines...) Expand 10 before | Expand all | Expand 10 after
7842 masm.GetCode(&desc); 7840 masm.GetCode(&desc);
7843 // Call the function from C++. 7841 // Call the function from C++.
7844 return FUNCTION_CAST<ModuloFunction>(buffer); 7842 return FUNCTION_CAST<ModuloFunction>(buffer);
7845 } 7843 }
7846 7844
7847 #endif 7845 #endif
7848 7846
7849 #undef __ 7847 #undef __
7850 7848
7851 } } // namespace v8::internal 7849 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698