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

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

Issue 8139027: Version 3.6.5 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' Created 9 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 | « src/full-codegen.h ('k') | src/func-name-inferrer.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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 void BreakableStatementChecker::VisitBinaryOperation(BinaryOperation* expr) { 238 void BreakableStatementChecker::VisitBinaryOperation(BinaryOperation* expr) {
239 Visit(expr->left()); 239 Visit(expr->left());
240 if (expr->op() != Token::AND && 240 if (expr->op() != Token::AND &&
241 expr->op() != Token::OR) { 241 expr->op() != Token::OR) {
242 Visit(expr->right()); 242 Visit(expr->right());
243 } 243 }
244 } 244 }
245 245
246 246
247 void BreakableStatementChecker::VisitCompareToNull(CompareToNull* expr) {
248 Visit(expr->expression());
249 }
250
251
252 void BreakableStatementChecker::VisitCompareOperation(CompareOperation* expr) { 247 void BreakableStatementChecker::VisitCompareOperation(CompareOperation* expr) {
253 Visit(expr->left()); 248 Visit(expr->left());
254 Visit(expr->right()); 249 Visit(expr->right());
255 } 250 }
256 251
257 252
258 void BreakableStatementChecker::VisitThisFunction(ThisFunction* expr) { 253 void BreakableStatementChecker::VisitThisFunction(ThisFunction* expr) {
259 } 254 }
260 255
261 256
(...skipping 22 matching lines...) Expand all
284 ASSERT(!isolate->has_pending_exception()); 279 ASSERT(!isolate->has_pending_exception());
285 return false; 280 return false;
286 } 281 }
287 unsigned table_offset = cgen.EmitStackCheckTable(); 282 unsigned table_offset = cgen.EmitStackCheckTable();
288 283
289 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION); 284 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION);
290 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, flags, info); 285 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, flags, info);
291 code->set_optimizable(info->IsOptimizable()); 286 code->set_optimizable(info->IsOptimizable());
292 cgen.PopulateDeoptimizationData(code); 287 cgen.PopulateDeoptimizationData(code);
293 code->set_has_deoptimization_support(info->HasDeoptimizationSupport()); 288 code->set_has_deoptimization_support(info->HasDeoptimizationSupport());
289 #ifdef ENABLE_DEBUGGER_SUPPORT
294 code->set_has_debug_break_slots( 290 code->set_has_debug_break_slots(
295 info->isolate()->debugger()->IsDebuggerActive()); 291 info->isolate()->debugger()->IsDebuggerActive());
292 #endif // ENABLE_DEBUGGER_SUPPORT
296 code->set_allow_osr_at_loop_nesting_level(0); 293 code->set_allow_osr_at_loop_nesting_level(0);
297 code->set_stack_check_table_offset(table_offset); 294 code->set_stack_check_table_offset(table_offset);
298 CodeGenerator::PrintCode(code, info); 295 CodeGenerator::PrintCode(code, info);
299 info->SetCode(code); // may be an empty handle. 296 info->SetCode(code); // may be an empty handle.
300 #ifdef ENABLE_GDB_JIT_INTERFACE 297 #ifdef ENABLE_GDB_JIT_INTERFACE
301 if (FLAG_gdbjit && !code.is_null()) { 298 if (FLAG_gdbjit && !code.is_null()) {
302 GDBJITLineInfo* lineinfo = 299 GDBJITLineInfo* lineinfo =
303 masm.positions_recorder()->DetachGDBJITLineInfo(); 300 masm.positions_recorder()->DetachGDBJITLineInfo();
304 301
305 GDBJIT(RegisterDetailedLineInfo(*code, lineinfo)); 302 GDBJIT(RegisterDetailedLineInfo(*code, lineinfo));
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 int* stack_depth, 1311 int* stack_depth,
1315 int* context_length) { 1312 int* context_length) {
1316 // The macros used here must preserve the result register. 1313 // The macros used here must preserve the result register.
1317 __ Drop(*stack_depth); 1314 __ Drop(*stack_depth);
1318 __ PopTryHandler(); 1315 __ PopTryHandler();
1319 *stack_depth = 0; 1316 *stack_depth = 0;
1320 return previous_; 1317 return previous_;
1321 } 1318 }
1322 1319
1323 1320
1324 bool FullCodeGenerator::TryLiteralCompare(CompareOperation* compare, 1321 bool FullCodeGenerator::TryLiteralCompare(CompareOperation* expr) {
1325 Label* if_true, 1322 Expression *sub_expr;
1326 Label* if_false,
1327 Label* fall_through) {
1328 Expression *expr;
1329 Handle<String> check; 1323 Handle<String> check;
1330 if (compare->IsLiteralCompareTypeof(&expr, &check)) { 1324 if (expr->IsLiteralCompareTypeof(&sub_expr, &check)) {
1331 EmitLiteralCompareTypeof(expr, check, if_true, if_false, fall_through); 1325 EmitLiteralCompareTypeof(sub_expr, check);
1332 return true; 1326 return true;
1333 } 1327 }
1334 1328
1335 if (compare->IsLiteralCompareUndefined(&expr)) { 1329 if (expr->IsLiteralCompareUndefined(&sub_expr)) {
1336 EmitLiteralCompareUndefined(expr, if_true, if_false, fall_through); 1330 EmitLiteralCompareNil(expr, sub_expr, kUndefinedValue);
1331 return true;
1332 }
1333
1334 if (expr->IsLiteralCompareNull(&sub_expr)) {
1335 EmitLiteralCompareNil(expr, sub_expr, kNullValue);
1337 return true; 1336 return true;
1338 } 1337 }
1339 1338
1340 return false; 1339 return false;
1341 } 1340 }
1342 1341
1343 1342
1344 #undef __ 1343 #undef __
1345 1344
1346 1345
1347 } } // namespace v8::internal 1346 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/func-name-inferrer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698