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

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

Issue 3146037: Cleanup the AST code by removing unused parts and get rid of the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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
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 2988 matching lines...) Expand 10 before | Expand all | Expand 10 after
2999 Split(cc, if_true, if_false, NULL); 2999 Split(cc, if_true, if_false, NULL);
3000 } 3000 }
3001 } 3001 }
3002 3002
3003 // Convert the result of the comparison into one expected for this 3003 // Convert the result of the comparison into one expected for this
3004 // expression's context. 3004 // expression's context.
3005 Apply(context_, if_true, if_false); 3005 Apply(context_, if_true, if_false);
3006 } 3006 }
3007 3007
3008 3008
3009 void FullCodeGenerator::VisitCompareToNull(CompareToNull* expr) {
3010 Comment cmnt(masm_, "[ CompareToNull");
3011 Label materialize_true, materialize_false;
3012 Label* if_true = NULL;
3013 Label* if_false = NULL;
3014 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false);
3015
3016 VisitForValue(expr->expression(), kAccumulator);
3017 __ LoadRoot(r1, Heap::kNullValueRootIndex);
3018 __ cmp(r0, r1);
3019 if (expr->is_strict()) {
3020 Split(eq, if_true, if_false, NULL);
3021 } else {
3022 __ b(eq, if_true);
3023 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
3024 __ cmp(r0, r1);
3025 __ b(eq, if_true);
3026 __ tst(r0, Operand(kSmiTagMask));
3027 __ b(eq, if_false);
3028 // It can be an undetectable object.
3029 __ ldr(r1, FieldMemOperand(r0, HeapObject::kMapOffset));
3030 __ ldrb(r1, FieldMemOperand(r1, Map::kBitFieldOffset));
3031 __ and_(r1, r1, Operand(1 << Map::kIsUndetectable));
3032 __ cmp(r1, Operand(1 << Map::kIsUndetectable));
3033 Split(eq, if_true, if_false, NULL);
3034 }
3035 Apply(context_, if_true, if_false);
3036 }
3037
3038
3009 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { 3039 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) {
3010 __ ldr(r0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 3040 __ ldr(r0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
3011 Apply(context_, r0); 3041 Apply(context_, r0);
3012 } 3042 }
3013 3043
3014 3044
3015 Register FullCodeGenerator::result_register() { return r0; } 3045 Register FullCodeGenerator::result_register() { return r0; }
3016 3046
3017 3047
3018 Register FullCodeGenerator::context_register() { return cp; } 3048 Register FullCodeGenerator::context_register() { return cp; }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
3055 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3085 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3056 __ add(pc, r1, Operand(masm_->CodeObject())); 3086 __ add(pc, r1, Operand(masm_->CodeObject()));
3057 } 3087 }
3058 3088
3059 3089
3060 #undef __ 3090 #undef __
3061 3091
3062 } } // namespace v8::internal 3092 } } // namespace v8::internal
3063 3093
3064 #endif // V8_TARGET_ARCH_ARM 3094 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/ast.h » ('j') | src/x64/full-codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698